12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- using Aitex.Core.RT.Device;
- using Aitex.Core.Util;
- using Aitex.Sorter.Common;
- using Aitex.Sorter.RT.EFEMs.Servers;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robot;
- namespace Aitex.Sorter.RT.EFEMs.Tasks
- {
- public class AbortTask : CheckImp, ITask
- {
- public AbortTask()
- {
- }
- public bool Execute(out string result, params string[] args)
- {
- string device = DeviceName.Robot;
- if (args.Length > 0)
- {
- result = PARAM_NG;
- return false;
- }
- if (!Check<NoReadyPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<VacPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<EMSPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<CMPLPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<ErrorPolicy>(device, out result))
- {
- return false;
- }
-
- if (!Check<NoHoldPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<MaintenancePolicy>(device, out result))
- {
- return false;
- }
- if (!Check<PowerDownPolicy>(device, out result))
- {
- return false;
- }
- Singleton<EfemEntity>.Instance.SetSystemUnHold();
-
- if (Singleton<EfemEntity>.Instance.EfemDevice.Home(ModuleName.Robot))
- {
- result = "BUSY";
- return false;
- }
- return true;
- }
- public bool? Monitor(out string result, params string[] args)
- {
- result = string.Empty;
- if (Singleton<EfemEntity>.Instance.EfemDevice.CheckIsError(ModuleName.Robot))
- {
- return false;
- }
- if (Singleton<EfemEntity>.Instance.EfemDevice.CheckIsIdle(ModuleName.Robot))
- {
- return true;
- }
- return null;
- }
- }
- }
|