12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using Aitex.Core.RT.Device;
- using Aitex.Core.RT.Device.Unit;
- using Aitex.Core.Util;
- using Aitex.Sorter.Common;
- using athosRT.Devices.EFEM.ABS;
- using athosRT.Modules.EFEMs;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.LoadPorts.LoadPortBase;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace athosRT.Devices.EFEM.Task
- {
- public class SetTransferTask : CheckImp, ITask
- {
- public bool Execute(out string result, params string[] args)
- {
- string str = this.Args2Unit(args.Length != 0 ? args[0] : string.Empty);
- IServerModule entity = this.GetEntity(str);
- if (entity == null || entity is LoadPortServerModule)
- {
- result = "PARAM_NG";
- return false;
- }
- if (!this.Check<NoReadyPolicy>(str, out result) || !this.Check<BusyPolicy>(str, out result) || !this.Check<RemovePolicy>(str, out result) || !this.Check<MaintenancePolicy>(str, out result) || !this.Check<LinkPolicy>(str, out result) || !this.Check<NoFuncPolicy>(str, out result))
- return false;
- E84Passiver device = DEVICE.GetDevice<E84Passiver>(Singleton<EfemEntity>.Instance.GetE84LpName(str.ToString()));
- if (device == null)
- return false;
- return bool.Parse(args[0]) ? device.SetAMHS(out result) : device.SetManual(out result);
- }
- public bool? Monitor(out string result, params string[] args)
- {
- result = string.Empty;
- string str = this.Args2Unit(args.Length != 0 ? args[0] : string.Empty);
- LoadPortBaseDevice device = DEVICE.GetDevice<LoadPortBaseDevice>(str);
- if (device.IsError)
- {
- this.flag3 = ErrorCheckList3.INTERNAL;
- return new bool?(this.CheckError(str, out result));
- }
- return !device.IsBusy && device.ClampState == FoupClampState.Close ? new bool?(true) : new bool?();
- }
- }
- }
|