123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using Aitex.Core.Common;
- using Aitex.Core.RT.Device;
- using Aitex.Core.RT.Device.Unit;
- using athosRT.Devices.EFEM.ABS;
- using athosRT.tool;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace athosRT.Devices.EFEM.Task
- {
- public class LiftTask : CheckImp, ITask
- {
- public bool Execute(out string result, params string[] args)
- {
- string str1 = this.Args2Unit(args.Length != 0 ? args[0] : string.Empty);
- BufferServerModule entity = (BufferServerModule)this.GetEntity(str1);
- if (entity == null)
- {
- result = "PARAM_NG";
- return false;
- }
- string str2 = args[1];
- if (str2 != "UP" && str2 != "DOWN")
- {
- LogObject.Warning("LiftTask", "Lift command parameter 1 must be 'UP|DOWN'");
- result = "PARAM_NG";
- return false;
- }
- if (!this.Check<NoReadyPolicy>(str1, out result) || !this.Check<NoInitCompletedPolicy>(str1, out result) || !this.Check<NoOriginCompletedPolicy>(str1, out result) || !this.Check<VacPolicy>(str1, out result) || !this.Check<EMSPolicy>(str1, out result) || !this.Check<ErrorPolicy>(str1, out result) || !this.Check<BusyPolicy>(str1, out result) || !this.Check<HoldPolicy>(str1, out result) || !this.Check<RemovePolicy>(str1, out result) || !this.Check<MaintenancePolicy>(str1, out result) || !this.Check<LinkPolicy>(str1, out result) || !this.Check<ArmExtendPolicy>(str1, out result) || !this.Check<PowerDownPolicy>(str1, out result))
- return false;
- if (str2 == "UP")
- entity.LiftUp(out result);
- else
- entity.LiftDown(WaferSize.WS0, out result);
- return true;
- }
- public bool? Monitor(out string result, params string[] args)
- {
- result = string.Empty;
- string str = this.Args2Unit(args.Length != 0 ? args[0] : string.Empty);
- IoCoolingBuffer device = DEVICE.GetDevice<IoCoolingBuffer>(str);
- if (device.Error)
- {
- this.flag1 = ErrorCheckList1.VAC | ErrorCheckList1.STALL | ErrorCheckList1.LIMIT | ErrorCheckList1.POSITION | ErrorCheckList1.EMS | ErrorCheckList1.COMM | ErrorCheckList1.COMM2 | ErrorCheckList1.CLAMPON | ErrorCheckList1.CLAMPOF;
- this.flag2 = ErrorCheckList2.COMMAND | ErrorCheckList2.CLAMP_S;
- this.flag3 = ErrorCheckList3.WAFLOST | ErrorCheckList3.ALIGNNG | ErrorCheckList3.HARDWARE | ErrorCheckList3.INTERNAL;
- return new bool?(this.CheckError(str, out result));
- }
- return !device.Busy ? new bool?(true) : new bool?();
- }
- }
- }
|