123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- using Aitex.Core.RT.Device;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robot;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace athosRT.Devices.EFEM
- {
- public class AlignerServerModule : IServerModule, IData, IFunction
- {
- private double _angle = 0.0;
- protected Aligner _aligner = (Aligner)null;
- public bool IsLinkOk => this._aligner != null && this._aligner.Communication;
- public bool Busy => this._aligner.Busy;
- public bool Moving => this._aligner.Moving;
- public bool Error => this._aligner.Error;
- public string Name { get; set; }
- public bool Disabled { get; set; }
- public bool Initialized { get; set; }
- public bool OriginSearched { get; set; }
- public bool InUsed { get; set; }
- public Aligner GetDevice() => this._aligner;
- public AlignerServerModule(string name)
- {
- this.Name = name;
- this._aligner = DEVICE.GetDevice<Aligner>("Aligner");
- }
- public bool Init(out string reason) => this._aligner.Init(out reason);
- public bool Home(out string reason) => this._aligner.Home(out reason);
- public bool Align(out string reason) => this._aligner.Align(this._angle, out reason);
- public bool SetAlign(string target, out string reason)
- {
- reason = string.Empty;
- if (target.StartsWith("P1"))
- this._angle = 0.0;
- else if (target.StartsWith("P2"))
- this._angle = 0.0;
- else if (target.StartsWith("P3"))
- this._angle = 0.0;
- else if (target.StartsWith("P4"))
- this._angle = 0.0;
- else if (target.StartsWith("LLA"))
- this._angle = 0.0;
- else if (target.StartsWith("LLB"))
- {
- this._angle = 0.0;
- }
- else
- {
- target = target.Replace("D", "");
- if (!double.TryParse(target, out this._angle))
- return false;
- }
- return true;
- }
- }
- }
|