123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Aitex.Core.RT.Fsm;
- using Aitex.Core.Common;
- using Aitex.Core.RT.DataCenter;
- using Aitex.Core.RT.Event;
- using Aitex.Core.RT.OperationCenter;
- using Aitex.Core.RT.Routine;
- using Aitex.Core.RT.SCCore;
- using Aitex.Core.Util;
- using MECF.Framework.Common.Jobs;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.SubstrateTrackings;
- using Venus_Core;
- using Venus_RT.Modules.PMs;
- using Aitex.Core.RT.Log;
- using Venus_RT.Modules.VCE;
- using Venus_RT.Devices.PreAligner;
- using Venus_RT.Modules.TM.VenusEntity;
- using SecsGem.Core.Application;
- using Aitex.Core.RT.RecipeCenter;
- using System.Reflection;
- using Venus_RT.Modules.LPs;
- using System.Runtime.InteropServices;
- using Venus_RT.Devices.EFEM;
- namespace Venus_RT.Modules
- {
- class RouteManager : Entity, IEntity, IEquipmentCommand
- {
- public enum MSG
- {
- MoveWafer,
- ReturnWafer,
- HomeUnit,
- PauseAuto,
- ResumeAuto,
- Stop,
- StartCycle,
- StopCycle,
- HOME,
- RESET,
- ABORT,
- ERROR,
- SetAutoMode,
- SetManualMode,
- ResetIdleCleanTime,
- ResetIdlePurgeTime,
- CreateJob,
- PauseJob,
- ResumeJob,
- StartJob,
- StopJob,
- AbortJob,
- JobDone,
- CassetteLeave, //For unload light control off afer job done
- Map,
- ReturnAllWafer,
- TMCycle,
- SETMCycle,
- StopSECycle,
- CreateSEJob,
- StartSEJob,
- AbortSEJob,
- SEMoveWafer,
- SEReturnWafer,
- SEAbort,
- }
- public PMEntity PMA { get; private set; }
- public PMEntity PMB { get; private set; }
- public PMEntity PMC { get; private set; }
- public PMEntity PMD { get; private set; }
- public TMEntity TM { get; private set; }
- public LLEntity LLA { get; private set; }
- public LLEntity LLB { get; private set; }
- public EfemEntity EFEM { get; private set; }
- public VceEntity VCE { get; private set; }
- public VceEntity VCEA { get; private set; }
- public VceEntity VCEB { get; private set; }
- public SETMEntity seTM { get; private set; }
- public string Name { get; set; }
- public bool IsAutoMode
- {
- get
- {
- return fsm.State == (int)RtState.AutoRunning || fsm.State == (int)RtState.AutoIdle;
- }
- }
- public bool IsInit
- {
- get { return fsm.State == (int)RtState.Init; }
- }
- public bool IsIdle
- {
- get { return fsm.State == (int)RtState.Idle || fsm.State == (int)RtState.AutoIdle; }
- }
- public bool IsAlarm
- {
- get { return fsm.State == (int)RtState.Error; }
- }
- public bool IsPaused
- {
- get { return _AutoCycle.CycleState == RState.Paused; }
- }
- public bool IsEntityError
- {
- get
- {
- return (EFEM?.IsError ?? false)
- || (PMA?.IsError ?? false)
- || (PMB?.IsError ?? false)
- || (PMC?.IsError ?? false)
- || (PMD?.IsError ?? false);
- }
- }
- public bool IsRunning
- {
- get
- {
- return !IsInit && !IsAlarm && !IsIdle;
- }
- }
- public static bool IsATMMode
- {
- get
- {
- if (_isATMMode == -1)
- {
- _isATMMode = SC.GetValue<bool>("System.IsATMMode") ? 1 : 0;
- }
- return _isATMMode == 1;
- }
- }
- public SequenceLLInOutPath LLInOutPath => _AutoCycle.LLInOutPath;
- private TMCycle _TMCycle;
- private ICycle _AutoCycle;
- private ManualTransfer _manualTransfer;
- private ReturnAllWafer _returnWafer;
- private SETMCycle _seTMCycle;
- private SEManualTransfer _setransfer;
- private SEReturnWafer _sereturnWafer;
- private bool _isWaitUnload;
- private static int _isATMMode = -1;
- public RouteManager()
- {
- Name = "System";
- if (ModuleHelper.IsInstalled(ModuleName.PMA))
- PMA = new PMEntity(ModuleName.PMA);
- if (ModuleHelper.IsInstalled(ModuleName.PMB))
- PMB = new PMEntity(ModuleName.PMB);
- if (ModuleHelper.IsInstalled(ModuleName.PMC))
- PMC = new PMEntity(ModuleName.PMC);
- if (ModuleHelper.IsInstalled(ModuleName.PMD))
- PMD = new PMEntity(ModuleName.PMD);
- if (ModuleHelper.IsInstalled(ModuleName.TM))
- TM = new TMEntity();
- if (ModuleHelper.IsInstalled(ModuleName.LLA))
- LLA = new LLEntity(ModuleName.LLA);
- if (ModuleHelper.IsInstalled(ModuleName.LLB))
- LLB = new LLEntity(ModuleName.LLB);
- if (ModuleHelper.IsInstalled(ModuleName.EFEM))
- EFEM = new EfemEntity();
- if (ModuleHelper.IsInstalled(ModuleName.VCE1))
- {
- //临时加 后改为配置项
- VCE = new VceEntity(ModuleName.VCE1);
- }
- if (ModuleHelper.IsInstalled(ModuleName.VCEA))
- {
- //临时加 后改为配置项
- VCEA = new VceEntity(ModuleName.VCEA);
- }
- if (ModuleHelper.IsInstalled(ModuleName.VCEB))
- {
- //临时加 后改为配置项
- VCEB = new VceEntity(ModuleName.VCEB);
- }
- if (ModuleHelper.IsInstalled(ModuleName.SETM))
- {
- seTM = new SETMEntity(ModuleName.SETM) ;
- }
- else if (ModuleHelper.IsInstalled(ModuleName.DETM))
- {
- seTM = new SETMEntity(ModuleName.DETM);
- }
- fsm = new StateMachine<RouteManager>(Name, (int)RtState.Init, 200);
- SubscribeOperation();
- SubscribeDataVariable();
- }
- public bool Check(int msg, out string reason, params object[] args)
- {
- if (!fsm.FindTransition(fsm.State, msg))
- {
- reason = String.Format("{0} is in {1} state,can not do {2}", Name, 0, (MSG)msg);
- return false;
- }
- if (msg == (int)MSG.StartCycle)
- {
- if (!IsAutoMode)
- {
- reason = String.Format("can not do {0}, isn't auto mode.", msg.ToString());
- return false;
- }
- }
- reason = "";
- return true;
- }
- void SubscribeDataVariable()
- {
- DATA.Subscribe("Rt.Status", () => ((RtState)fsm.State).ToString(), SubscriptionAttribute.FLAG.IgnoreSaveDB);
- DATA.Subscribe(ModuleName.System.ToString(), "AlarmEvent", EV.GetAlarmEvent, SubscriptionAttribute.FLAG.IgnoreSaveDB);
- DATA.Subscribe("System.IsAutoMode", () => IsAutoMode, SubscriptionAttribute.FLAG.IgnoreSaveDB);
- DATA.Subscribe("System.IsIdle", () => IsIdle || IsInit, SubscriptionAttribute.FLAG.IgnoreSaveDB);
- DATA.Subscribe("System.IsAlarm", () => IsAlarm || IsEntityError, SubscriptionAttribute.FLAG.IgnoreSaveDB);
- DATA.Subscribe("System.IsBusy", () => IsRunning, SubscriptionAttribute.FLAG.IgnoreSaveDB);
- DATA.Subscribe("System.IsWaitUnload", () => _isWaitUnload && IsAutoMode, SubscriptionAttribute.FLAG.IgnoreSaveDB);
- //DATA.Subscribe("System.IsConnectedWithHost", () => Singleton<SecGemApplication>.Instance., SubscriptionAttribute.FLAG.IgnoreSaveDB);
- DATA.Subscribe("EquipmentMode", () => IsAutoMode ? 0 : 1, SubscriptionAttribute.FLAG.IgnoreSaveDB);
- DATA.Subscribe("EquipmentStatus", () =>
- {
- //"0 = Uninit
- //1 = Idle
- //2 = Running
- //3 = Error
- //4 = Pause
- //"
- if (IsInit) return 0;
- if (IsIdle) return 1;
- if (IsAlarm) return 3;
- if (IsPaused) return 4;
- return 2;
- }, SubscriptionAttribute.FLAG.IgnoreSaveDB);
- }
- void SubscribeOperation()
- {
- OP.Subscribe("CreateWafer", InvokeCreateWafer);
- OP.Subscribe("DeleteWafer", InvokeDeleteWafer);
- OP.Subscribe("System.Home", (cmd, args) => CheckToPostMessage((int)MSG.HOME, args));
- OP.Subscribe("TMCycle.Start", (cmd, args) => CheckToPostMessage((int)MSG.TMCycle, args));
- OP.Subscribe("TMCycle.Abort", (cmd, args) => CheckToPostMessage((int)MSG.StopCycle, args));
- OP.Subscribe("System.StopSECycle", (cmd, args) => CheckToPostMessage((int)MSG.StopSECycle, args));
- DATA.Subscribe("SYSTEM.FsmState", () => (((RtState)fsm.State).ToString()));
- DATA.Subscribe("TMCycle.CycleIndex", () => (_TMCycle?.CycleIndex));
- OP.Subscribe("ReturnWafer", InvokeReturnWafer);
- OP.Subscribe("System.ReturnAllWafer", (string cmd, object[] args) =>
- {
- if (seTM != null && (VCE != null || VCEA !=null || VCEB != null))
- return CheckToPostMessage((int)MSG.SEReturnWafer, args);
- else
- return CheckToPostMessage((int)MSG.ReturnAllWafer, args[0], args[1], args[2], args[3]);
- });
- OP.Subscribe("System.MoveWafer", (string cmd, object[] args) =>
- {
- if (!Enum.TryParse((string)args[0], out ModuleName source))
- {
- EV.PostWarningLog(Name, $"Parameter source {(string)args[0]} not valid");
- return false;
- }
- if (!Enum.TryParse((string)args[2], out ModuleName destination))
- {
- EV.PostWarningLog(Name, $"Parameter destination {(string)args[1]} not valid");
- return false;
- }
- if (seTM != null && (VCE != null || VCEA != null || VCEB != null))
- return CheckToPostMessage((int)MSG.SEMoveWafer,
- source, (int)args[1],
- destination, (int)args[3],
- args[4], args[5],
- args[6], args[7], (string)args[8]);
- else
- return CheckToPostMessage((int)MSG.MoveWafer,
- source, (int)args[1],
- destination, (int)args[3],
- args[4], args[5],
- args[6], args[7], (string)args[8]);
- });
- OP.Subscribe("System.HomeAll", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.HOME);
- });
- OP.Subscribe("System.Abort", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.ABORT);
- });
- OP.Subscribe("System.Reset", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.RESET);
- });
- OP.Subscribe("System.SetAutoMode", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.SetAutoMode);
- });
- OP.Subscribe("System.SetManualMode", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.SetManualMode);
- });
- OP.Subscribe("System.CreateJob", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.CreateJob, args[0]);
- });
- OP.Subscribe("System.StartJob", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.StartJob, args[0]);
- });
- OP.Subscribe("System.PauseJob", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.PauseJob, args[0]);
- });
- OP.Subscribe("System.ResumeJob", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.ResumeJob, args[0]);
- });
- OP.Subscribe("System.StopJob", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.StopJob, args[0]);
- });
- OP.Subscribe("System.AbortJob", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.AbortJob, args[0]);
- });
- OP.Subscribe("SE.AbortJob", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.AbortSEJob, args[0]);
- });
- OP.Subscribe("LP1.Map", (string cmd, object[] args) =>
- {
- if (IsAutoMode)
- {
- return CheckToPostMessage((int)MSG.Map, ModuleName.LP1.ToString());
- }
- return EFEM.InvokeMap(ModuleName.LP1.ToString()) != (int)FSM_MSG.NONE;
- });
- OP.Subscribe("LP2.Map", (string cmd, object[] args) =>
- {
- if (IsAutoMode)
- {
- return CheckToPostMessage((int)MSG.Map, ModuleName.LP2.ToString());
- }
- return EFEM.InvokeMap(ModuleName.LP2.ToString()) != (int)FSM_MSG.NONE;
- });
- OP.Subscribe(RtOperation.SetConfig.ToString(), (name, args) =>
- {
- string sc_key = args[0] as string;
- if (!string.IsNullOrWhiteSpace(sc_key) && args.Length > 1)
- {
- SC.SetItemValue(sc_key, args[1]);
- }
- return true;
- });
- OP.Subscribe("System.ResetIdleCleanTime", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.ResetIdleCleanTime, args[0]);
- });
- OP.Subscribe("System.ResetIdlePurgeTime", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.ResetIdlePurgeTime, args[0]);
- });
- OP.Subscribe("System.SetWaferSize", (string cmd, object[] args) =>
- {
- string module = (string)args[0];
- string size = (string)args[1];
- switch (size)
- {
- case "3":
- WaferManager.Instance.UpdateWaferSize(ModuleHelper.Converter(module), 0, WaferSize.WS3);
- break;
- case "4":
- WaferManager.Instance.UpdateWaferSize(ModuleHelper.Converter(module), 0, WaferSize.WS4);
- break;
- case "6":
- WaferManager.Instance.UpdateWaferSize(ModuleHelper.Converter(module), 0, WaferSize.WS6);
- break;
- default:
- EV.PostWarningLog("System", $"wafer size {size} not valid");
- break;
- }
- return true;
- });
- OP.Subscribe("System.CassetteLeave", (string cmd, object[] args) =>
- {
- return CheckToPostMessage((int)MSG.CassetteLeave);
- });
- OP.Subscribe("System.IsModuleInstalled", (string cmd, object[] args) =>
- {
- return ModuleHelper.IsInstalled((ModuleName)args[0]);
- });
- OP.Subscribe("System.SETMCycle", (cmd, args) => CheckToPostMessage((int)MSG.SETMCycle, args));
- OP.Subscribe("System.CreateSEJob", (cmd, args) => CheckToPostMessage((int)MSG.CreateSEJob, args));
- OP.Subscribe("System.StartSEJob", (cmd, args) => CheckToPostMessage((int)MSG.StartSEJob, args));
- OP.Subscribe("System.ReturnAllSEWafer", (cmd, args) => CheckToPostMessage((int)MSG.SEReturnWafer, args));
- OP.Subscribe("System.SEAbort", (cmd, args) => CheckToPostMessage((int)MSG.SEAbort, args));
- }
- public bool CheckToPostMessage(int msg, params object[] args)
- {
- if (!fsm.FindTransition(fsm.State, msg))
- {
- LOG.Write(eEvent.WARN_ROUTER, ModuleName.System, $"System is in {(RtState)fsm.State} state,can not do {(MSG)msg}");
- return false;
- }
- Running = true;
- fsm.PostMsg(msg, args);
- return true;
- }
- public bool InvokeAbort(object[] args)
- {
- return CheckToPostMessage((int)MSG.ABORT, args);
- }
- private bool InvokeCreateWafer(string arg1, object[] args)
- {
- ModuleName chamber = ModuleHelper.Converter(args[0].ToString());
- int slot = (int)args[1];
- WaferStatus state = WaferStatus.Normal;
- if (WaferManager.Instance.IsWaferSlotLocationValid(chamber, slot))
- {
- if (WaferManager.Instance.CheckHasWafer(chamber, slot))
- {
- LOG.Write(eEvent.EV_ROUTER, "System", string.Format("{0} slot {1} already has wafer.create wafer is not valid", chamber, slot));
- }
- else if (WaferManager.Instance.CreateWafer(chamber, slot, state) != null)
- {
- LOG.Write(eEvent.EV_WAFER_CREATE, ModuleName.System, chamber.ToString(), (slot + 1).ToString(), state.ToString());
- }
- }
- else
- {
- LOG.Write(eEvent.WARN_ROUTER, "System", string.Format("Invalid position,{0},{1}", chamber.ToString(), slot.ToString()));
- return false;
- }
- return true;
- }
- private bool InvokeDeleteWafer(string arg1, object[] args)
- {
- ModuleName chamber = ModuleHelper.Converter(args[0].ToString());
- int slot = (int)args[1];
- if (WaferManager.Instance.IsWaferSlotLocationValid(chamber, slot))
- {
- if (WaferManager.Instance.CheckHasWafer(chamber, slot))
- {
- WaferManager.Instance.DeleteWafer(chamber, slot);
- EV.PostMessage(ModuleName.System.ToString(), EventEnum.WaferDelete, chamber.ToString(), slot + 1);
- }
- else
- {
- LOG.Write(eEvent.EV_ROUTER, "System", string.Format("No wafer at {0} {1}, delete not valid", chamber.ToString(), slot + 1));
- }
- }
- else
- {
- LOG.Write(eEvent.WARN_ROUTER, "System", string.Format("Invalid position,{0},{1}", chamber.ToString(), slot.ToString()));
- return false;
- }
- return true;
- }
- private bool InvokeReturnWafer(string arg1, object[] args)
- {
- ModuleName target = ModuleHelper.Converter(args[0].ToString());
- int slot = (int)args[1];
- if (seTM != null && (VCE != null || VCEA != null || VCEB != null))
- {
- if (ModuleHelper.IsVCE(target))
- {
- LOG.Write(eEvent.WARN_ROUTER, "System", string.Format("Wafer already at vce {0} {1}, return operation is not valid", target.ToString(), slot + 1));
- return false;
- }
- WaferInfo wafer = WaferManager.Instance.GetWafer(target, slot);
- if (wafer.IsEmpty)
- {
- LOG.Write(eEvent.WARN_ROUTER, "System", string.Format("No wafer at {0} {1}, return operation is not valid", target.ToString(), slot + 1));
- return false;
- }
- return CheckToPostMessage((int)MSG.SEMoveWafer,
- target, slot,
- (ModuleName)wafer.OriginStation, wafer.OriginSlot,
- false, 0, false, 0, "Blade1");
- }
- else
- {
- if (ModuleHelper.IsLoadPort(target))
- {
- LOG.Write(eEvent.WARN_ROUTER, "System", string.Format("Wafer already at LoadPort {0} {1}, return operation is not valid", target.ToString(), slot + 1));
- return false;
- }
- if (!WaferManager.Instance.IsWaferSlotLocationValid(target, slot))
- {
- LOG.Write(eEvent.WARN_ROUTER, "System", string.Format("Invalid position,{0},{1}", target.ToString(), slot.ToString()));
- return false;
- }
- WaferInfo wafer = WaferManager.Instance.GetWafer(target, slot);
- if (wafer.IsEmpty)
- {
- LOG.Write(eEvent.WARN_ROUTER, "System", string.Format("No wafer at {0} {1}, return operation is not valid", target.ToString(), slot + 1));
- return false;
- }
- return CheckToPostMessage((int)MSG.MoveWafer,
- target, slot,
- (ModuleName)wafer.OriginStation, wafer.OriginSlot,
- false, 0, false, 0, "Blade1");
- }
- }
- public PMEntity GetPM(ModuleName mod)
- {
- if (ModuleHelper.IsInstalled(mod))
- {
- switch (mod)
- {
- case ModuleName.PMA:
- return PMA;
- case ModuleName.PMB:
- return PMB;
- case ModuleName.PMC:
- return PMC;
- case ModuleName.PMD:
- return PMD;
- }
- }
- return null;
- }
- public LLEntity GetLL(ModuleName mod)
- {
- if (ModuleHelper.IsInstalled(mod))
- {
- switch (mod)
- {
- case ModuleName.LLA:
- return LLA;
- case ModuleName.LLB:
- return LLB;
- }
- }
- return null;
- }
- public VceEntity GetVCE(ModuleName mod)
- {
- if (ModuleHelper.IsInstalled(mod))
- {
- switch (mod)
- {
- case ModuleName.VCE1:
- return VCE;
- case ModuleName.VCEA:
- return VCEA;
- case ModuleName.VCEB:
- return VCEB;
- }
- }
- return null;
- }
- public TMEntity GetTM()
- {
- return TM;
- }
- protected override bool Init()
- {
- PMA?.Initialize();
- PMB?.Initialize();
- PMC?.Initialize();
- PMD?.Initialize();
- TM?.Initialize();
- LLA?.Initialize();
- LLB?.Initialize();
- EFEM?.Initialize();
- VCE?.Initialize();
- VCEA?.Initialize();
- VCEB?.Initialize();
- seTM?.Initialize();
- _TMCycle = new TMCycle();
- //_AutoCycle = new AutoCycle();
- _AutoCycle = new SystemDispatcher();
- _manualTransfer = new ManualTransfer();
- _returnWafer = new ReturnAllWafer(_manualTransfer);
- _seTMCycle = new SETMCycle(ModuleName.SETM);
- _setransfer = new SEManualTransfer();
- _sereturnWafer = new SEReturnWafer(_setransfer);
- BuildTransitionTable();
- return true;
- }
- private void BuildTransitionTable()
- {
- //Init sequence
- Transition(RtState.Init, MSG.HOME, FsmStartHome, RtState.Initializing);
- Transition(RtState.Idle, MSG.HOME, FsmStartHome, RtState.Initializing);
- Transition(RtState.Error, MSG.HOME, FsmStartHome, RtState.Initializing);
- EnterExitTransition<RtState, FSM_MSG>(RtState.AutoRunning, FsmEnterAutoRunning, FSM_MSG.NONE, FsmExitAutoTransfer);
- EnterExitTransition<RtState, FSM_MSG>(RtState.Transfer, null, FSM_MSG.NONE, FsmExitTransfer);
- EnterExitTransition<RtState, FSM_MSG>(RtState.ReturnWafer, null, FSM_MSG.NONE, FsmExitReturnWafer);
- AnyStateTransition(MSG.ERROR, FsmError, RtState.Error);
- Transition(RtState.Idle, FSM_MSG.TIMER, FsmMonitor, RtState.Idle);
- Transition(RtState.Init, FSM_MSG.TIMER, FsmMonitor, RtState.Init);
- Transition(RtState.Initializing, FSM_MSG.TIMER, FsmMonitorHome, RtState.Idle);
- Transition(RtState.Initializing, MSG.ERROR, FsmError, RtState.Error);
- Transition(RtState.Initializing, MSG.ABORT, FsmAbort, RtState.Init);
- // TM Cycle
- Transition(RtState.Idle, MSG.TMCycle, FsmStartTMCycle, RtState.TMCycle);
- Transition(RtState.TMCycle, FSM_MSG.TIMER, FsmMonitorTMCycle, RtState.Idle);
- Transition(RtState.TMCycle, MSG.StopCycle, FsmStopTMCycle, RtState.Idle);
- //Auto/manual
- Transition(RtState.Idle, MSG.SetAutoMode, FsmStartAutoTransfer, RtState.AutoIdle);
- Transition(RtState.AutoRunning, FSM_MSG.TIMER, FsmAutoTransfer, RtState.AutoIdle);
- Transition(RtState.AutoRunning, MSG.ABORT, FsmAbortAutoTransfer, RtState.Idle);
- //Transition(RtState.AutoRunning, MSG.SetManualMode, FsmStartSetManualMode, RtState.Idle);
- Transition(RtState.AutoRunning, MSG.JobDone, FsmJobDone, RtState.AutoIdle);
- //Transition(RtState.AutoRunning, MSG.CassetteLeave, fCassetteLeave, RtState.AutoRunning); //For unload light control off afer job done
- Transition(RtState.AutoRunning, MSG.CreateJob, FsmCreateJob, RtState.AutoRunning);
- Transition(RtState.AutoRunning, MSG.StartJob, FsmStartJob, RtState.AutoRunning);
- Transition(RtState.AutoRunning, MSG.PauseJob, FsmPauseJob, RtState.AutoRunning);
- Transition(RtState.AutoRunning, MSG.ResumeJob, FsmResumeJob, RtState.AutoRunning);
- Transition(RtState.AutoRunning, MSG.StopJob, FsmStopJob, RtState.AutoRunning);
- Transition(RtState.AutoRunning, MSG.AbortJob, FsmAbortJob, RtState.AutoRunning);
- Transition(RtState.AutoRunning, MSG.MoveWafer, FsmAutoReturnWafer, RtState.AutoRunning);
- Transition(RtState.AutoRunning, MSG.Map, FsmMap, RtState.AutoRunning);
- Transition(RtState.AutoRunning, MSG.ResetIdleCleanTime, FsmResetIdleCleanTime, RtState.AutoRunning);
- Transition(RtState.AutoRunning, MSG.ResetIdlePurgeTime, FsmResetIdlePurgeTime, RtState.AutoRunning);
- Transition(RtState.AutoIdle, FSM_MSG.TIMER, FsmMonitorAutoIdle, RtState.AutoIdle);
- Transition(RtState.AutoIdle, MSG.SetManualMode, FsmStartSetManualMode, RtState.Idle);
- Transition(RtState.AutoIdle, MSG.CreateJob, FsmCreateJob, RtState.AutoIdle);
- Transition(RtState.AutoIdle, MSG.StartJob, FsmStartJob, RtState.AutoRunning);
- Transition(RtState.AutoIdle, MSG.PauseJob, FsmPauseJob, RtState.AutoIdle);
- Transition(RtState.AutoIdle, MSG.ResumeJob, FsmResumeJob, RtState.AutoIdle);
- Transition(RtState.AutoIdle, MSG.StopJob, FsmStopJob, RtState.AutoIdle);
- Transition(RtState.AutoIdle, MSG.AbortJob, FsmAbortJob, RtState.AutoIdle);
- Transition(RtState.AutoIdle, MSG.Map, FsmMap, RtState.AutoIdle);
- //Transfer
- Transition(RtState.Idle, MSG.MoveWafer, FsmStartTransfer, RtState.Transfer);
- Transition(RtState.Transfer, FSM_MSG.TIMER, FsmMonitorTransfer, RtState.Idle);
- Transition(RtState.Transfer, MSG.ABORT, FsmAbort, RtState.Idle);
- //Return Wafer
- Transition(RtState.Idle, MSG.ReturnAllWafer, FsmStartReturnWafer, RtState.ReturnWafer);
- Transition(RtState.ReturnWafer, FSM_MSG.TIMER, FsmMonitorReturnWafer, RtState.Idle);
- Transition(RtState.ReturnWafer, MSG.ABORT, FsmAbort, RtState.Idle);
- // SETM Cycle
- Transition(RtState.Idle, MSG.SETMCycle, FsmStartSETMCycle, RtState.SETMCycle);
- Transition(RtState.SETMCycle, FSM_MSG.TIMER, FsmMonitorSETMCycle, RtState.Idle);
- Transition(RtState.SETMCycle, MSG.SEAbort, SEAbort, RtState.Idle);
- Transition(RtState.SETMCycle, MSG.AbortSEJob, SEAbortJob, RtState.Idle);
- // SETM CreateCycle
- Transition(RtState.Idle, MSG.CreateSEJob, FsmStartCreateSEJob, RtState.Idle);
- // SETM StartCycle
- Transition(RtState.Idle, MSG.StartSEJob, FsmStartSEJob, RtState.SERunning);
- Transition(RtState.SERunning, FSM_MSG.TIMER, FsmSEJobMonitor, RtState.Idle);
- Transition(RtState.SERunning, MSG.SEAbort, SEAbort, RtState.Idle);
- Transition(RtState.SERunning, MSG.AbortSEJob, SEAbortJob, RtState.Idle);
- Transition(RtState.Idle, MSG.AbortSEJob, SEAbortJob, RtState.Idle);
- // SE Transfer
- Transition(RtState.Idle, MSG.SEMoveWafer, FsmStartSEMoveWafer, RtState.SETransfer);
- Transition(RtState.SETransfer, FSM_MSG.TIMER, FsmMonitorSEMoveWafer, RtState.Idle);
- Transition(RtState.SETransfer, MSG.SEAbort, SEAbort, RtState.Idle);
- // SE ReturnWafer
- Transition(RtState.Idle, MSG.SEReturnWafer, FsmStartSEReturnWafer, RtState.SEReturnWafer);
- Transition(RtState.SEReturnWafer, FSM_MSG.TIMER, FsmMonitorSEReturnWafer, RtState.Idle);
- Transition(RtState.SEReturnWafer, MSG.SEAbort, SEAbort, RtState.Idle);
- }
- private bool FsmMonitor(object[] objs)
- {
- _debugRoutine();
- return true;
- }
- private bool FsmStartHome(object[] objs)
- {
- TM?.Invoke("Home");
- EFEM?.Invoke("Home");
- seTM?.Invoke("Home");
- VCE?.Invoke("Home");
- VCEA?.Invoke("Home");
- VCEB?.Invoke("Home");
- foreach (var mod in ModuleHelper.InstalledModules)
- {
- if (ModuleHelper.IsPm(mod))
- {
- if (GetPM(mod).IsInclude)
- {
- GetPM(mod).Invoke("Home");
- }
- }
- else if (ModuleHelper.IsLoadLock(mod))
- {
- if (GetLL(mod).IsInclude)
- {
- GetLL(mod).Invoke("Home");
- }
- }
- }
- return true;
- }
- private bool FsmMonitorHome(object[] objs)
- {
- ModuleName notReadyModule = ModuleName.System;
- foreach (var mod in ModuleHelper.InstalledModules)
- {
- if ((ModuleHelper.IsPm(mod) && GetPM(mod).IsInclude && !GetPM(mod).IsIdle) ||
- (ModuleHelper.IsLoadLock(mod) && GetLL(mod).IsInclude && !GetLL(mod).IsIdle) ||
- (ModuleHelper.IsTM(mod) && !GetTM().IsIdle) ||
- (ModuleHelper.IsVCE(mod) && !GetVCE(mod).IsIdle) ||
- (ModuleHelper.IsEFEM(mod) && !EFEM.IsIdle) ||
- (ModuleHelper.isSETM(mod) && !seTM.IsIdle))
- {
- notReadyModule = mod;
- break;
- }
- }
- if (notReadyModule != ModuleName.System)
- {
- if (fsm.ElapsedTime > 100 * 1000)
- {
- LOG.Write(eEvent.ERR_ROUTER, ModuleName.System, $"{notReadyModule} home timeout");
- PostMsg(MSG.ERROR);
- return true;
- }
- else
- return false;
- }
- return true;
- }
- private bool FsmEnterAutoRunning(object[] objs)
- {
- return true;
- }
- private bool FsmExitAutoTransfer(object[] objs)
- {
- _AutoCycle.Clear();
- return true;
- }
- private bool FsmExitTransfer(object[] objs)
- {
- _manualTransfer.Clear();
- return true;
- }
- private bool FsmExitReturnWafer(object[] objs)
- {
- _returnWafer.Clear();
- return true;
- }
- private bool FsmError(object[] objs)
- {
- return true;
- }
- private bool FsmAbort(object[] objs)
- {
- _manualTransfer.Clear();
- _returnWafer.Clear();
- _AutoCycle.Clear();
- return true;
- }
- private bool FsmStartTMCycle(object[] objs)
- {
- return _TMCycle.Start(objs) == RState.Running;
- }
- private bool FsmMonitorTMCycle(object[] objs)
- {
- RState ret = _TMCycle.Monitor();
- if (ret == RState.Failed || ret == RState.Timeout)
- {
- PostMsg(MSG.ERROR);
- return false;
- }
- return ret == RState.End;
- }
- private bool FsmStopTMCycle(object[] objs)
- {
- _TMCycle.Abort();
- return true;
- }
- private bool FsmStartAutoTransfer(object[] objs)
- {
- return _AutoCycle.Start(objs) == RState.Running;
- }
- private bool FsmAutoTransfer(object[] objs)
- {
- RState ret = _AutoCycle.Monitor();
- if (ret == RState.Failed)
- {
- if (!CheckToPostMessage((int)MSG.ERROR))
- return false;
- }
- if (_AutoCycle.CheckJobJustDone(out string jobInfo))
- {
- EV.PostPopDialogMessage(EventLevel.InformationNoDelay, "Job complete", jobInfo);
- }
- if (_AutoCycle.CheckAllJobDone())
- {
- if (!CheckToPostMessage((int)MSG.JobDone))
- return false;
- }
- //_isWaitUnload = (bool)DATA.Poll("LP1.NotifyJobDone") || (bool)DATA.Poll("LP2.NotifyJobDone");
- return ret == RState.End;
- }
- private bool FsmAbortAutoTransfer(object[] objs)
- {
- _AutoCycle.Clear();
- return true;
- }
- private bool FsmJobDone(object[] objs)
- {
- _isWaitUnload = true;
- return true;
- }
- private bool FsmCreateJob(object[] objs)
- {
- Dictionary<string, object> obj = (Dictionary<string, object>)objs[0];
- var moduleName = (ModuleName)Enum.Parse(typeof(ModuleName), obj["Module"].ToString());
- if (EFEM.EfemDevice[moduleName].IsLoaded)
- {
- return _AutoCycle.CreateJob(obj, out var reason);
- }
- else
- {
- LOG.Write(eEvent.WARN_ROUTER, ModuleName.System, $"{obj["Module"]} is unload,can not create job");
- return false;
- }
- }
- private bool FsmStartJob(object[] objs)
- {
- _AutoCycle.StartJob((string)objs[0], out var reason);
- return true;
- }
- private bool FsmPauseJob(object[] objs)
- {
- _AutoCycle.PauseJob((string)objs[0], out var reason);
- return true;
- }
- private bool FsmResumeJob(object[] objs)
- {
- _AutoCycle.ResumeJob((string)objs[0], out var reason);
- return true;
- }
- private bool FsmStopJob(object[] objs)
- {
- _AutoCycle.StopJob((string)objs[0], out var reason);
- return true;
- }
- private bool FsmAbortJob(object[] objs)
- {
- _AutoCycle.AbortJob((string)objs[0], out var reason);
- return true;
- }
- private bool FsmStartTransfer(object[] objs)
- {
- return _manualTransfer.Start(objs) == RState.Running;
- }
- private bool FsmMonitorTransfer(object[] objs)
- {
- RState ret = _manualTransfer.Monitor();
- if (ret == RState.Failed || ret == RState.Timeout)
- {
- PostMsg(MSG.ERROR);
- return false;
- }
- return ret == RState.End;
- }
- private bool FsmStartReturnWafer(object[] objs)
- {
- //return _returnWafer.Start(objs) == RState.Running;
- return _AutoCycle.CheckManualReturnWafer() == RState.Running;
- }
- private bool FsmMonitorReturnWafer(object[] objs)
- {
- //RState ret = _returnWafer.Monitor();
- RState ret = _AutoCycle.ReturnAllWafers();
- if (ret == RState.Failed || ret == RState.Timeout)
- {
- PostMsg(MSG.ERROR);
- return false;
- }
- return ret == RState.End;
- }
- private bool FsmMap(object[] objs)
- {
- return true;
- }
- private bool FsmResetIdleCleanTime(object[] objs)
- {
- return true;
- }
- private bool FsmResetIdlePurgeTime(object[] objs)
- {
- return true;
- }
- private bool FsmAutoReturnWafer(object[] objs)
- {
- return _AutoCycle.ManualReturnWafer(objs);
- }
- private bool FsmMonitorAutoIdle(object[] objs)
- {
- RState ret = _AutoCycle.Monitor();
- //if (_AutoCycle.CheckAllJobDone())
- //{
- // if (!CheckToPostMessage((int)MSG.JobDone))
- // return false;
- //}
- //_isWaitUnload = (bool)DATA.Poll("LP1.NotifyJobDone") || (bool)DATA.Poll("LP2.NotifyJobDone");
- _debugRoutine();
- return ret == RState.End;
- }
- private bool FsmStartSetManualMode(object[] objs)
- {
- if (_AutoCycle.HasJobRunning)
- {
- LOG.Write(eEvent.WARN_ROUTER, "System", "Can not change to manual mode, abort running job first");
- return false;
- }
- return true;
- }
- private void _debugRoutine()
- {
- int flag = 0;
- // Test Home routine
- if (flag == 1)
- {
- PostMsg(MSG.HOME);
- }
- else if (flag == 2)
- {
- PostMsg(MSG.TMCycle);
- }
- else if (flag == 3)
- {
- PostMsg(MSG.SetAutoMode);
- }
- else if (flag == 4)
- {
- PostMsg(MSG.ReturnAllWafer);
- }
- else if (flag == 5)
- {
- PostMsg(MSG.StartJob, "CJ_Local_LP1");
- }
- }
- private bool FsmStartSETMCycle(object[] objs)
- {
- return _seTMCycle.Start(objs) == RState.Running;
- }
- private bool FsmMonitorSETMCycle(object[] objs)
- {
- RState ret = _seTMCycle.Monitor();
- if (ret == RState.Failed || ret == RState.Timeout)
- {
- PostMsg(MSG.ERROR);
- return false;
- }
- return ret == RState.End;
- }
- private bool FsmStopSETMCycle(object[] objs)
- {
- _seTMCycle.Abort();
- return true;
- }
- private bool FsmStartCreateSEJob(object[] objs)
- {
- _seTMCycle.CreateJob((Dictionary<string, object>)objs[0]);
- return true;
- }
- private bool FsmStartSEJob(object[] objs)
- {
- return _seTMCycle.StartJob(objs[0].ToString()) == RState.Running;
- }
- private bool FsmSEJobMonitor(object[] objs)
- {
- RState ret = _seTMCycle.Monitor();
- return ret == RState.End;
- }
- private bool FsmStartSEMoveWafer(object[] objs)
- {
- return _setransfer.Start(objs) == RState.Running;
- }
- private bool FsmMonitorSEMoveWafer(object[] objs)
- {
- RState ret = _setransfer.Monitor();
- if (ret == RState.Failed || ret == RState.Timeout)
- {
- PostMsg(MSG.ERROR);
- return false;
- }
- return ret == RState.End;
- }
- private bool FsmStartSEReturnWafer(object[] objs)
- {
- return _sereturnWafer.Start(objs) == RState.Running;
- }
- private bool FsmMonitorSEReturnWafer(object[] objs)
- {
- RState ret = _sereturnWafer.Monitor();
- if (ret == RState.Failed || ret == RState.Timeout)
- {
- PostMsg(MSG.ERROR);
- return false;
- }
- return ret == RState.End;
- }
- private bool SEAbortJob(object[] objs)
- {
- _seTMCycle.AbortJob((string)objs[0], out var reason);
- return true;
- }
- private bool SEAbort(object[] objs)
- {
- //_seTMCycle.Abort();
- _setransfer.Abort();
- _sereturnWafer.Abort();
- seTM.CheckToPostMessage((int)SETMEntity.MSG.Abort);
- return true;
- }
- #region Fa接口
- /// <summary>
- /// 接口指令
- /// </summary>
- /// <param name="command"></param>
- /// <param name="paras"></param>
- /// <param name="reason"></param>
- /// <returns></returns>
- public bool ExcuteCommand(string command, object[] paras, out string reason)
- {
- reason = "";
- switch (command)
- {
- case "PP-SELECT":
- return FaCreateJob(paras, out reason);
- case "StartJob":
- return FaStartJob(paras[0].ToString(), out reason);
- case "StopJob":
- return FaStopJob(paras[0].ToString(), out reason);
- case "AbortJob":
- return FaAbortob(paras[0].ToString(), out reason);
- case "PauseJob":
- return FaPauseJob(paras[0].ToString(), out reason);
- case "ResumeJob":
- return FaResumeJob(paras[0].ToString(), out reason);
- case "Load":
- return FaLoad(paras[0].ToString(), out reason);
- case "Unload":
- return FaUnLoad(paras[0].ToString(), out reason);
- case "ReadID":
- return FaReadId(paras[0].ToString(), out reason);
- }
- return true;
- }
- /// <summary>
- /// Fa创建任务
- /// </summary>
- /// <param name="paras"></param>
- /// <param name="reason"></param>
- /// <returns></returns>
- private bool FaCreateJob(object[] paras, out string reason)
- {
- if (!CheckAuto())
- {
- reason = "System is not in Auto,cannot create job";
- return false;
- }
- else
- {
- Dictionary<string, object> createParams = new Dictionary<string, object>();
- createParams["Module"] = $"LP{paras[0]}";
- createParams["JobId"] = paras[1].ToString();
- createParams["SlotSequence"] = (string[])paras[3];
- createParams["AutoStart"] = true;
- if (paras.Length >= 5)
- {
- createParams["PreCleanRecipeName"] = paras[4].ToString();
- }
- if (paras.Length >= 6)
- {
- createParams["PostCleabRecipeName"] = paras[5].ToString();
- }
- return _AutoCycle.CreateJob(createParams, out reason);
- }
- }
- /// <summary>
- /// Fa启动任务
- /// </summary>
- /// <param name="jobName"></param>
- /// <param name="reason"></param>
- /// <returns></returns>
- private bool FaStartJob(string jobName, out string reason)
- {
- return _AutoCycle.StartJob(jobName, out reason);
- }
- /// <summary>
- /// Fa停止任务
- /// </summary>
- /// <param name="jobName"></param>
- /// <param name="reason"></param>
- /// <returns></returns>
- private bool FaStopJob(string jobName, out string reason)
- {
- return _AutoCycle.StopJob(jobName, out reason);
- }
- /// <summary>
- /// Fa中止任务
- /// </summary>
- /// <param name="jobName"></param>
- /// <param name="reason"></param>
- /// <returns></returns>
- private bool FaAbortob(string jobName, out string reason)
- {
- return _AutoCycle.AbortJob(jobName, out reason);
- }
- /// <summary>
- /// Fa暂停任务
- /// </summary>
- /// <param name="jobName"></param>
- /// <param name="reason"></param>
- /// <returns></returns>
- private bool FaPauseJob(string jobName, out string reason)
- {
- return _AutoCycle.PauseJob(jobName, out reason);
- }
- /// <summary>
- /// Fa恢复任务
- /// </summary>
- /// <param name="jobName"></param>
- /// <param name="reason"></param>
- /// <returns></returns>
- private bool FaResumeJob(string jobName, out string reason)
- {
- return _AutoCycle.ResumeJob(jobName, out reason);
- }
- /// <summary>
- /// Fa Load
- /// </summary>
- /// <param name="lp"></param>
- /// <returns></returns>
- private bool FaLoad(string lp, out string reason)
- {
- reason = "";
- Loadport loadport = FaGetLoadPort(lp, out reason);
- if (loadport != null)
- {
- loadport.Load();
- return true;
- }
- else
- {
- return false;
- }
- }
- /// <summary>
- /// 获取LoadPort对象
- /// </summary>
- /// <param name="lp"></param>
- /// <param name="reason"></param>
- /// <returns></returns>
- private Loadport FaGetLoadPort(string lp, out string reason)
- {
- reason = "";
- if (int.TryParse(lp, out var lpValue))
- {
- LoadPortModule loadPortModule = EFEM.GetLoadportModule(lpValue);
- if (loadPortModule != null)
- {
- if (loadPortModule.LPDevice.HasCassette)
- {
- return loadPortModule.LPDevice;
- }
- else
- {
- reason = $"LP{lpValue} not found carrier, can not load";
- return null;
- }
- }
- else
- {
- reason = $"LP{lp} is null";
- return null;
- }
- }
- else
- {
- reason = $"{lp} is invalid data";
- return null;
- }
- }
- /// <summary>
- /// 读取Id
- /// </summary>
- /// <param name="lp"></param>
- /// <returns></returns>
- private bool FaReadId(string lp, out string reason)
- {
- reason = "";
- Loadport loadport = FaGetLoadPort(lp, out reason);
- if (loadport != null)
- {
- loadport.ReadCarrierID();
- return true;
- }
- else
- {
- return false;
- }
- }
- /// <summary>
- /// Fa Unload
- /// </summary>
- /// <param name="lp"></param>
- /// <returns></returns>
- private bool FaUnLoad(string lp, out string reason)
- {
- reason = "";
- Loadport loadport = FaGetLoadPort(lp, out reason);
- if (loadport != null)
- {
- loadport.Unload();
- return true;
- }
- else
- {
- return false;
- }
- }
- /// <summary>
- /// 获取所有Sequence
- /// </summary>
- /// <returns></returns>
- public string[] GetSequenceList()
- {
- return RecipeFileManager.Instance.GetSequenceNameList().ToArray();
- }
- public string GetSequenceBody(string ppid)
- {
- return RecipeFileManager.Instance.GetSequence(ppid, false);
- }
- public List<string> GetFormatedSequence(string ppid)
- {
- return null;
- }
- public bool deleteSequence(string ppid)
- {
- return true;
- }
- public bool UpdateSequence(string ppid, string body)
- {
- return true;
- }
- public void ShowTerminalMessage(string message)
- {
- }
- public bool CreateProcessJob(string processJobId, string sequenceName, string carrierId, out string reason)
- {
- reason = "";
- return true;
- }
- public void UpdateProcessJobCarrierSlot(string processJobId, string moduleName, List<int> slots)
- {
- }
- public void CreateControlJob(string controlJobId, string carrierId, List<string> processJobs)
- {
- }
- public bool CheckCreateControlJobCondition(List<string> modules, out string reason)
- {
- reason = "";
- return true;
- }
- public bool StartControlJob(string controlJob)
- {
- return true;
- }
- public bool StopControlJob(string controlJob)
- {
- return true;
- }
- public bool AbortControlJob(string controlJob)
- {
- return true;
- }
- public bool PauseControlJob(string controlJob)
- {
- return true;
- }
- public bool ResumeControlJob(string controlJob)
- {
- return true;
- }
- public bool CheckAuto()
- {
- return fsm.State == (int)RtState.AutoIdle;
- }
- public void UpdateControlJobModule(string controlJobId, string moduleName)
- {
- }
- #endregion
- }
- }
|