123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using Aitex.Core.RT.Device;
- using Aitex.Core.Util;
- using Aitex.Sorter.Common;
- using Aitex.Sorter.RT.EFEMs.Servers;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robot;
- namespace Aitex.Sorter.RT.EFEMs.Tasks
- {
- public class EmsTask : CheckImp, ITask
- {
- public EmsTask()
- {
- }
- public bool Execute(out string result, params string[] args)
- {
- string device = DeviceName.Robot;
- if (!Check<NoReadyPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<EMSPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<ErrorPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<HoldPolicy>(device, out result))
- {
- return false;
- }
- if (!Check<MaintenancePolicy>(device, out result))
- {
- return false;
- }
- if (!Check<NoReadyPolicy>(device, out result))
- {
- return false;
- }
-
- Singleton<EfemEntity>.Instance.EfemDevice.IsEMSStop = false;
-
- return true;
- }
- public bool? Monitor(out string result, params string[] args)
- {
- result = string.Empty;
-
- if (Singleton<EfemEntity>.Instance.EfemDevice.IsError)
- {
- result = "ERROR";
- return false;
- }
- if (Singleton<EfemEntity>.Instance.EfemDevice.IsIdle &&
- Singleton<EfemEntity>.Instance.EfemDevice.CheckAcked(_token))
- {
- return true;
- }
- return null;
- }
- }
- }
|