IoWaferSizeDetector.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. using System;
  2. using System.Security.AccessControl;
  3. using System.Xml;
  4. using Aitex.Core.Common;
  5. using Aitex.Core.Common.DeviceData;
  6. using Aitex.Core.RT.DataCenter;
  7. using Aitex.Core.RT.Event;
  8. using Aitex.Core.RT.IOCore;
  9. using Aitex.Core.RT.Log;
  10. using Aitex.Core.Util;
  11. namespace Aitex.Core.RT.Device.Unit
  12. {
  13. public class IoWaferSizeDetector : BaseDevice, IDevice
  14. {
  15. public WaferSize Value
  16. {
  17. get
  18. {
  19. if (_diSensorInch3 != null && _diSensorInch3.Value)
  20. return WaferSize.WS3;
  21. if (_diSensorInch4 != null && _diSensorInch4.Value)
  22. return WaferSize.WS4;
  23. if (_diSensorInch6 != null && _diSensorInch6.Value)
  24. return WaferSize.WS6;
  25. return WaferSize.WS0;
  26. }
  27. }
  28. public bool NotPresent3
  29. {
  30. get { return _diSensorInch3.Value; }
  31. }
  32. public bool NotPresent4
  33. {
  34. get { return _diSensorInch4.Value; }
  35. }
  36. public bool NotPresent6
  37. {
  38. get { return _diSensorInch6.Value; }
  39. }
  40. public bool HasCassette
  41. {
  42. get { return !_diSensorInch3.Value || !_diSensorInch4.Value || !_diSensorInch6.Value; }
  43. }
  44. private DIAccessor _diSensorInch3 = null;
  45. private DIAccessor _diSensorInch4 = null;
  46. private DIAccessor _diSensorInch6 = null;
  47. public IoWaferSizeDetector(string module, XmlElement node, string ioModule = "")
  48. {
  49. var attrModule = node.GetAttribute("module");
  50. base.Module = string.IsNullOrEmpty(attrModule) ? module : attrModule;
  51. base.Name = node.GetAttribute("id");
  52. base.Display = node.GetAttribute("display");
  53. base.DeviceID = node.GetAttribute("schematicId");
  54. _diSensorInch3 = ParseDiNode("diSensorInch3", node, ioModule);
  55. _diSensorInch4 = ParseDiNode("diSensorInch4", node, ioModule);
  56. _diSensorInch6 = ParseDiNode("diSensorInch6", node, ioModule);
  57. }
  58. public bool Initialize()
  59. {
  60. return true;
  61. }
  62. public void Terminate()
  63. {
  64. }
  65. public void Monitor()
  66. {
  67. }
  68. public void Reset()
  69. {
  70. }
  71. }
  72. }