123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using Aitex.Core.RT.Device;
- using Aitex.Core.RT.Device.Unit;
- using athosRT.Devices.EFEM.Task;
- using athosRT.tool;
- using MECF.Framework.Common.Equipment;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace athosRT.Devices.EFEM.ABS
- {
- class AirPolicy : CheckImp, IPolicy
- {
- public new bool Check(string device, out string reason)
- {
- reason = string.Empty;
- if (device == "SignalTower")
- {
- return true;
- }
- ModuleName result;
- if (!Enum.TryParse(device, out result))
- {
- reason = "PARAM_NG";
- return false;
- }
-
- if (ModuleHelper.IsLoadPort(result))
- {
- IoSensor device1 = DEVICE.GetDevice<IoSensor>("SensorAirPressureErrorForLoadport");
- //如果是LP LP的AIR压力信号满足 或者没有这个信号(不需要)
- if (device1 == null || device1.Value)
- return true;
- else
- {
- reason = $"AIR/{result}";
- return false;
- }
- }
- if (result == ModuleName.Robot || result ==ModuleName.System)
- {
- //如果是Robot Robot的AIR压力信号满足 或者没有这个信号(不需要)
- IoSensor device2 = DEVICE.GetDevice<IoSensor>("SensorAirPressureErrorForRobot");
- if (device2 == null || device2.Value)
- return true;
- else
- {
- reason = $"AIR/{result}";
- return false;
- }
- }
- reason = "";
- return true;
- }
- }
- }
|