123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- using Aitex.Core.RT.Device;
- using Aitex.Core.Util;
- using Aitex.Sorter.Common;
- using Efem;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robot;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.RobotBase;
- namespace EFEM.RT.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();
- RobotBaseDevice robot = DEVICE.GetDevice<RobotBaseDevice>(device);
- if (!robot.Home(null))
- {
- return false;
- }
- return true;
- }
- public bool? Monitor(out string result, params string[] args)
- {
- result = string.Empty;
- string device = DeviceName.Robot;
- RobotBaseDevice robot = DEVICE.GetDevice<RobotBaseDevice>(device);
- if (robot.IsError)
- {
- return false;
- }
- if (!robot.IsIdle)
- {
- return true;
- }
- return null;
- }
- }
- }
|