GetClampTask.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Aitex.Core.RT.Device;
  2. using Aitex.Sorter.Common;
  3. using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.RobotBase;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace athosRT.Devices.EFEM.Task
  10. {
  11. public class GetClampTask : CheckImp, ITask
  12. {
  13. public bool Execute(out string result, params string[] args)
  14. {
  15. result = "NOFUNC";
  16. return false;
  17. }
  18. public bool? Monitor(out string result, params string[] args)
  19. {
  20. result = string.Empty;
  21. if (!args[0].StartsWith("ARM"))
  22. return new bool?(true);
  23. string name = "Robot";
  24. Hand arm = Hand.Blade2;
  25. if (!this.ParseMoveArm(args[0], out arm) || arm == Hand.Both)
  26. {
  27. result = "PARAM_NG";
  28. return new bool?(false);
  29. }
  30. RobotBaseDevice device = DEVICE.GetDevice<RobotBaseDevice>(name);
  31. if (device.IsError)
  32. return new bool?(false);
  33. return !device.IsBusy ? new bool?(true) : new bool?();
  34. }
  35. }
  36. }