首次上传
This commit is contained in:
+513
@@ -0,0 +1,513 @@
|
||||
using System;
|
||||
using Aitex.Core.RT.Log;
|
||||
using Aitex.Core.RT.Event;
|
||||
using Aitex.Core.Util;
|
||||
using MECF.Framework.Common.Communications;
|
||||
using MECF.Framework.Common.SubstrateTrackings;
|
||||
using System.Collections.Generic;
|
||||
using Aitex.Core.RT.SCCore;
|
||||
using System.IO.Ports;
|
||||
using System.Threading;
|
||||
using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Aligners.AlignersBase;
|
||||
using Aitex.Core.Common;
|
||||
|
||||
namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.HonghuAligners
|
||||
{
|
||||
public class FuqiAligner : AlignerBaseDevice, IConnection
|
||||
{
|
||||
public enum AlignerType
|
||||
{
|
||||
Mechnical = 0,
|
||||
Vaccum,
|
||||
}
|
||||
public string Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return "";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsConnected
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public virtual bool Disconnect()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public virtual bool Connect()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public const string delimiter = "\r";
|
||||
|
||||
public int LastErrorCode { get; set; }
|
||||
public int Status { get; set; }
|
||||
|
||||
public int ElapseTime { get; set; }
|
||||
|
||||
public int Notch { get; set; }
|
||||
|
||||
public bool Initalized { get; set; }
|
||||
|
||||
|
||||
private AlignerType _tazmotype = AlignerType.Vaccum;
|
||||
public AlignerType TazmoType { get => _tazmotype; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public bool Communication
|
||||
{
|
||||
get
|
||||
{
|
||||
return !_commErr;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool Error
|
||||
{
|
||||
get; set;
|
||||
|
||||
}
|
||||
|
||||
public bool Busy { get { return _connection.IsBusy || _lstHandler.Count != 0; } }
|
||||
|
||||
|
||||
|
||||
|
||||
public bool TaExecuteSuccss
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void OnWaferPresent(bool iswaferon)
|
||||
{
|
||||
if(iswaferon)
|
||||
{
|
||||
if (WaferManager.Instance.CheckNoWafer(RobotModuleName, 0))
|
||||
WaferManager.Instance.CreateWafer(RobotModuleName, 0, WaferStatus.Normal);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (WaferManager.Instance.CheckHasWafer(RobotModuleName, 0))
|
||||
{
|
||||
var wafer = WaferManager.Instance.GetWafer(RobotModuleName, 0);
|
||||
//WaferManager.Instance.UpdateWaferE90State(wafer.WaferID, EnumE90Status.Aborted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//private int _deviceAddress;
|
||||
public override bool IsNeedRelease
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public FuqiAlignerConnection Connection
|
||||
{
|
||||
get => _connection;
|
||||
}
|
||||
private FuqiAlignerConnection _connection;
|
||||
|
||||
//private int _presetNumber;
|
||||
|
||||
private R_TRIG _trigError = new R_TRIG();
|
||||
|
||||
private R_TRIG _trigWarningMessage = new R_TRIG();
|
||||
|
||||
private R_TRIG _trigCommunicationError = new R_TRIG();
|
||||
private R_TRIG _trigRetryConnect = new R_TRIG();
|
||||
|
||||
private PeriodicJob _thread;
|
||||
private static Object _locker = new Object();
|
||||
|
||||
private LinkedList<HandlerBase> _lstHandler = new LinkedList<HandlerBase>();
|
||||
|
||||
private bool _enableLog = true;
|
||||
|
||||
private bool _commErr = false;
|
||||
|
||||
private int _defaultChuckPosition;
|
||||
//private bool _exceuteErr = false;
|
||||
//private string _addr;
|
||||
|
||||
|
||||
private DeviceTimer _timerQuery = new DeviceTimer();
|
||||
private string _scRoot;
|
||||
|
||||
|
||||
private string AlarmMechanicalAlignmentError = "MechanicalAlignmentError";
|
||||
public FuqiAligner(string module, string name,string scRoot,int alignertype=0)
|
||||
: base(module,name)
|
||||
{
|
||||
Name = name;
|
||||
Module = module;
|
||||
_scRoot = scRoot;
|
||||
|
||||
InitializeFuqi();
|
||||
//WaferManager.Instance.SubscribeLocation(name, 1);
|
||||
}
|
||||
|
||||
|
||||
public bool InitializeFuqi()
|
||||
{
|
||||
string portName = SC.GetStringValue($"{_scRoot}.{Name}.PortName");
|
||||
int bautRate = SC.GetValue<int>($"{_scRoot}.{Name}.BaudRate");
|
||||
int dataBits = SC.GetValue<int>($"{_scRoot}.{Name}.DataBits");
|
||||
Enum.TryParse(SC.GetStringValue($"{_scRoot}.{Name}.Parity"), out Parity parity);
|
||||
Enum.TryParse(SC.GetStringValue($"{_scRoot}.{Name}.StopBits"), out StopBits stopBits);
|
||||
_enableLog = SC.GetValue<bool>($"{_scRoot}.{Name}.EnableLogMessage");
|
||||
|
||||
_connection = new FuqiAlignerConnection(portName, bautRate, dataBits, parity, stopBits);
|
||||
_connection.EnableLog(_enableLog);
|
||||
|
||||
int count = SC.ContainsItem("System.ComPortRetryCount") ? SC.GetValue<int>("System.ComPortRetryCount") : 5;
|
||||
int sleep = SC.ContainsItem("System.ComPortRetryDelayTime") ? SC.GetValue<int>("System.ComPortRetryDelayTime") : 2;
|
||||
if (sleep <= 0 || sleep > 10)
|
||||
sleep = 2;
|
||||
|
||||
int retry = 0;
|
||||
do
|
||||
{
|
||||
_connection.Disconnect();
|
||||
Thread.Sleep(sleep * 1000);
|
||||
if (_connection.Connect())
|
||||
{
|
||||
EV.PostInfoLog(Module, $"{Module}.{Name} connected");
|
||||
break;
|
||||
}
|
||||
|
||||
if (count > 0 && retry++ > count)
|
||||
{
|
||||
LOG.Write($"Retry connect {Module}.{Name} stop retry.");
|
||||
EV.PostAlarmLog(Module, $"Can't connect to {Module}.{Name}.");
|
||||
break;
|
||||
}
|
||||
|
||||
Thread.Sleep(sleep * 1000);
|
||||
LOG.Write($"Retry connect {Module}.{Name} for the {retry + 1} time.");
|
||||
|
||||
} while (true);
|
||||
|
||||
_thread = new PeriodicJob(100, OnTimer, $"{Module}.{Name} MonitorHandler", true);
|
||||
|
||||
// string str = string.Empty;
|
||||
EV.Subscribe(new EventItem(0, "Event", AlarmMechanicalAlignmentError, "Aligner error", EventLevel.Alarm, Aitex.Core.RT.Event.EventType.HostNotification));
|
||||
|
||||
// _timerQuery.Start(_queryPeriod);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool OnTimer()
|
||||
{
|
||||
try
|
||||
{
|
||||
_connection.MonitorTimeout();
|
||||
|
||||
if (!_connection.IsConnected || _connection.IsCommunicationError)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.Clear();
|
||||
}
|
||||
|
||||
_trigRetryConnect.CLK = !_connection.IsConnected;
|
||||
if (_trigRetryConnect.Q)
|
||||
{
|
||||
_connection.SetPortAddress(SC.GetStringValue($"{Name}.Address"));
|
||||
if (!_connection.Connect())
|
||||
{
|
||||
EV.PostAlarmLog(Module, $"Can not connect with {_connection.Address}, {Module}.{Name}");
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
HandlerBase handler = null;
|
||||
if (!_connection.IsBusy)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
if (_lstHandler.Count == 0)
|
||||
{
|
||||
//_lstHandler.AddLast(new SingleTransactionHandler(this, TazmoCommand.RequeststatusStatus, null));
|
||||
//_lstHandler.AddLast(new SingleTransactionHandler(this, TazmoCommand.Requeststatus2Status, null));
|
||||
}
|
||||
|
||||
if (_lstHandler.Count > 0)
|
||||
{
|
||||
handler = _lstHandler.First.Value;
|
||||
_lstHandler.RemoveFirst();
|
||||
if (handler != null) _connection.Execute(handler);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LOG.Write(ex);
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
_connection.EnableLog(_enableLog);
|
||||
|
||||
_trigCommunicationError.CLK = _connection.IsCommunicationError;
|
||||
if (_trigCommunicationError.Q)
|
||||
{
|
||||
EV.PostAlarmLog(Module, $"{Module}.{Name} communication error, {_connection.LastCommunicationError}");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LOG.Write(ex);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#region Command
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public virtual bool MoveToReady(out string reason)
|
||||
{
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool RequestPlace(out string reason)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.RequestPlace));
|
||||
|
||||
}
|
||||
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public override bool IsReady()
|
||||
{
|
||||
return AlignerState == AlignerStateEnum.Idle && !IsBusy;
|
||||
}
|
||||
|
||||
public override bool IsWaferPresent(int slotindex)
|
||||
{
|
||||
return WaferManager.Instance.CheckHasWafer(RobotModuleName, 0);
|
||||
}
|
||||
|
||||
protected override bool fStartLiftup(object[] param)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.RequestPlace));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
protected override bool fStartPrepareAccept(object[] param)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.RequestPlace));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fStartLiftdown(object[] param)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fStartAlign(object[] param)
|
||||
{
|
||||
double aligneangle = (double)param[0];
|
||||
lock (_locker)
|
||||
{
|
||||
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, $"B{aligneangle.ToString("f1")}"));
|
||||
//_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.SetVacuumOffAfterAlign));
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.RequestFinishPlace));
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.RequestVacuumOff));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fStop(object[] param)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool FsmAbort(object[] param)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fClear(object[] param)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fStartReadData(object[] param)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fStartSetParameters(object[] param)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fStartUnGrip(object[] param)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.RequestVacuumOff));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fStartGrip(object[] param)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.RequestVacuumOn));
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fResetToReady(object[] param)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fReset(object[] param)
|
||||
{
|
||||
_trigError.RST = true;
|
||||
_trigWarningMessage.RST = true;
|
||||
|
||||
_connection.SetCommunicationError(false, "");
|
||||
_trigCommunicationError.RST = true;
|
||||
if(!_connection.IsConnected)
|
||||
{
|
||||
string portName = SC.GetStringValue($"{Module}.{Name}.Address");
|
||||
int bautRate = SC.GetValue<int>($"{Module}.{Name}.BaudRate");
|
||||
int dataBits = SC.GetValue<int>($"{Module}.{Name}.DataBits");
|
||||
Enum.TryParse(SC.GetStringValue($"{Module}.{Name}.Parity"), out Parity parity);
|
||||
Enum.TryParse(SC.GetStringValue($"{Module}.{Name}.StopBits"), out StopBits stopBits);
|
||||
_enableLog = SC.GetValue<bool>($"{Module}.{Name}.EnableLogMessage");
|
||||
|
||||
_connection = new FuqiAlignerConnection(portName, bautRate, dataBits, parity, stopBits);
|
||||
_connection.EnableLog(_enableLog);
|
||||
_connection.Connect();
|
||||
}
|
||||
|
||||
|
||||
|
||||
_trigRetryConnect.RST = true;
|
||||
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.Clear();
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.SetUseNewCommand));
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.Reset));
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.SetVacuumOffAfterAlign));
|
||||
if(SC.ContainsItem($"{_scRoot}.{Name}.CenterAndNotch") && SC.GetValue<bool>($"{_scRoot}.{Name}.CenterAndNotch"))
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.SetCenterAndNotch));
|
||||
else
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.SetOnlyNotch));
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.SetWIDReaderOff));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fStartInit(object[] param)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.Clear();
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.SetUseNewCommand));
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.Reset));
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.SetWIDReaderOff));
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.SetVacuumOnAfterAlign));
|
||||
if (SC.ContainsItem($"{_scRoot}.{Name}.CenterAndNotch") && SC.GetValue<bool>($"{_scRoot}.{Name}.CenterAndNotch"))
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.SetCenterAndNotch));
|
||||
else
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.SetOnlyNotch));
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.RequestPlace));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
protected override bool fStartHome(object[] param)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.Clear();
|
||||
_lstHandler.AddLast(new FuqiRequestHandler(this, FuqiAlignerCommand.Reset));
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool fError(object[] param)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnActionDone()
|
||||
{
|
||||
IsBusy = false;
|
||||
if (_lstHandler.Count == 0)
|
||||
OnActionDone(null);
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override bool IsNeedPrepareBeforePlaceWafer()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override double CompensationAngleValue
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SC.ContainsItem($"Aligner.{Name}.CompensationAngle"))
|
||||
return SC.GetValue<double>($"Aligner.{Name}.CompensationAngle");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
using MECF.Framework.Common.Communications;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
|
||||
namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.HonghuAligners
|
||||
{
|
||||
public class FuqiAlignerMessage : AsciiMessage
|
||||
{
|
||||
public string Data { get; set; }
|
||||
}
|
||||
public class FuqiAlignerMessageBIN : BinaryMessage
|
||||
{
|
||||
public byte[] CMD { get; set; }
|
||||
public byte[] Data { get; set; }
|
||||
}
|
||||
|
||||
public class FuqiAlignerConnection : SerialPortConnectionBase
|
||||
{
|
||||
private List<byte> _lstCacheBuffer = new List<byte>();
|
||||
|
||||
public FuqiAlignerConnection(string portName, int baudRate = 9600, int dataBits = 8, Parity parity = Parity.None, StopBits stopBits = StopBits.One)
|
||||
: base(portName, baudRate, dataBits, parity, stopBits, "\r", false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override bool SendMessage(byte[] message)
|
||||
{
|
||||
_lstCacheBuffer.Clear();
|
||||
return base.SendMessage(message);
|
||||
}
|
||||
|
||||
protected override MessageBase ParseResponse(byte[] rawBuffer)
|
||||
{
|
||||
|
||||
_lstCacheBuffer.AddRange(rawBuffer);
|
||||
byte[] temps = _lstCacheBuffer.ToArray();
|
||||
FuqiAlignerMessageBIN msg = new FuqiAlignerMessageBIN();
|
||||
|
||||
msg.RawMessage = _lstCacheBuffer.ToArray();
|
||||
|
||||
if (temps.Last() == 0xA)
|
||||
{
|
||||
_lstCacheBuffer.Clear();
|
||||
msg.IsResponse = true;
|
||||
msg.CMD = temps;
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+360
@@ -0,0 +1,360 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using MECF.Framework.Common.Communications;
|
||||
|
||||
|
||||
namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.HonghuAligners
|
||||
{
|
||||
public static class FuqiAlignerCommand
|
||||
{
|
||||
public const string Reset = "C01";
|
||||
public const string RequestPlace = "C02";
|
||||
public const string RequestFinishPlace = "C03";
|
||||
public const string RequestVacuumOn = "C04";
|
||||
public const string RequestVacuumOff = "C05";
|
||||
public const string SetVacuumOffAfterAlign = "C06";
|
||||
public const string SetVacuumOnAfterAlign = "C07";
|
||||
public const string SetWIDReaderOn = "C08";
|
||||
public const string SetWIDReaderOff = "C09";
|
||||
public const string SetWIDReadComplete = "C10";
|
||||
public const string SetNotchProduct = "C11";
|
||||
public const string SetLineProduct = "C12";
|
||||
public const string SetCenterAndNotch = "C13";
|
||||
public const string SetOnlyNotch = "C14";
|
||||
public const string SetWIDReadFail = "C15";
|
||||
public const string SetAdjustFirstTime = "C16";
|
||||
public const string SetAdjustTwice = "C17";
|
||||
public const string SetUseNewCommand = "C41";
|
||||
public const string SetUseOldCommand = "C40";
|
||||
|
||||
/// <summary>
|
||||
/// A
|
||||
/// </summary>
|
||||
|
||||
}
|
||||
public class FuqiAlignerHandler : HandlerBase
|
||||
{
|
||||
public FuqiAligner Device { get; set; }
|
||||
|
||||
public string Command;
|
||||
|
||||
protected FuqiAlignerHandler(FuqiAligner device, string command) : base(BuildMesage(command))
|
||||
{
|
||||
Device = device;
|
||||
Command = command;
|
||||
Name = command;
|
||||
}
|
||||
|
||||
public static byte[] BuildMesage(string data)
|
||||
{
|
||||
List<byte> ret = new List<byte>();
|
||||
foreach (char c in data)
|
||||
{
|
||||
ret.Add((byte)c);
|
||||
}
|
||||
|
||||
return ret.ToArray();
|
||||
|
||||
}
|
||||
|
||||
public override bool HandleMessage(MessageBase msg, out bool transactionComplete)
|
||||
{
|
||||
FuqiAlignerMessageBIN response = msg as FuqiAlignerMessageBIN;
|
||||
ResponseMessage = msg;
|
||||
transactionComplete = false;
|
||||
if (response.IsResponse)
|
||||
{
|
||||
|
||||
SetState(EnumHandlerState.Completed);
|
||||
transactionComplete = true;
|
||||
}
|
||||
|
||||
Device.OnActionDone();
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public enum FuqiMotionStatus
|
||||
{
|
||||
None,
|
||||
Complete,
|
||||
Fail,
|
||||
}
|
||||
public class FuqiResetHandler : FuqiAlignerHandler
|
||||
{
|
||||
public FuqiResetHandler(FuqiAligner device, string command) : base(device, BuildData(command))
|
||||
{
|
||||
_xAxisStatus = MotionStatus.None;
|
||||
_yAxisStatus = MotionStatus.None;
|
||||
_zAxisStatus = MotionStatus.None;
|
||||
}
|
||||
private MotionStatus _xAxisStatus;
|
||||
private MotionStatus _yAxisStatus;
|
||||
private MotionStatus _zAxisStatus;
|
||||
|
||||
private static string BuildData(string command)
|
||||
{
|
||||
return command;
|
||||
}
|
||||
|
||||
public override bool HandleMessage(MessageBase msg, out bool transactionComplete)
|
||||
{
|
||||
HonghuAlignerMessageBIN response = msg as HonghuAlignerMessageBIN;
|
||||
ResponseMessage = msg;
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = false;
|
||||
if (response.IsAck)
|
||||
{
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("X01"))
|
||||
_xAxisStatus = MotionStatus.Complete;
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("X02"))
|
||||
_xAxisStatus = MotionStatus.Fail;
|
||||
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("Y01"))
|
||||
_yAxisStatus = MotionStatus.Complete;
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("Y02"))
|
||||
_yAxisStatus = MotionStatus.Fail;
|
||||
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("Z01"))
|
||||
_zAxisStatus = MotionStatus.Complete;
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("Z02"))
|
||||
_zAxisStatus = MotionStatus.Fail;
|
||||
|
||||
SetState(EnumHandlerState.Completed);
|
||||
|
||||
|
||||
if (_xAxisStatus == MotionStatus.Complete &&
|
||||
_yAxisStatus == MotionStatus.Complete &&
|
||||
_zAxisStatus == MotionStatus.Complete) Device.TaExecuteSuccss = true;
|
||||
|
||||
if (_xAxisStatus != MotionStatus.None &&
|
||||
_yAxisStatus != MotionStatus.None &&
|
||||
_zAxisStatus != MotionStatus.None) transactionComplete = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public class FuqiRequestHandler : FuqiAlignerHandler
|
||||
{
|
||||
private string cmd;
|
||||
public FuqiRequestHandler(FuqiAligner device, string command) : base(device, BuildData(command))
|
||||
{
|
||||
cmd = command;
|
||||
}
|
||||
private static string BuildData(string command)
|
||||
{
|
||||
return command;
|
||||
}
|
||||
|
||||
public override bool HandleMessage(MessageBase msg, out bool transactionComplete)
|
||||
{
|
||||
FuqiAlignerMessageBIN response = msg as FuqiAlignerMessageBIN;
|
||||
ResponseMessage = msg;
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = false;
|
||||
string commandstr = Encoding.ASCII.GetString(response.CMD);
|
||||
if (response.IsResponse)
|
||||
{
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case FuqiAlignerCommand.RequestPlace:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M01"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnWaferPresent(false);
|
||||
Device.OnActionDone();
|
||||
}
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M02"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnWaferPresent(true);
|
||||
Device.OnActionDone();
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.RequestFinishPlace:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M03"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M04"))
|
||||
{
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = true;
|
||||
}
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M17"))
|
||||
{
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = true;
|
||||
}
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M18"))
|
||||
{
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.RequestVacuumOn:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M05"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M06"))
|
||||
{
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = true;
|
||||
Device.OnError(Encoding.ASCII.GetString(response.CMD));
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.RequestVacuumOff:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M07"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M08"))
|
||||
{
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = true;
|
||||
Device.OnError(Encoding.ASCII.GetString(response.CMD));
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.Reset:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M00"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.Initalized = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.SetVacuumOffAfterAlign:
|
||||
case FuqiAlignerCommand.SetVacuumOnAfterAlign:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M09"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.SetWIDReaderOn:
|
||||
case FuqiAlignerCommand.SetWIDReaderOff:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M10"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.SetWIDReadComplete:
|
||||
case FuqiAlignerCommand.SetWIDReadFail:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M11"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.SetLineProduct:
|
||||
case FuqiAlignerCommand.SetNotchProduct:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M12"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.SetCenterAndNotch:
|
||||
case FuqiAlignerCommand.SetOnlyNotch:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M13"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.SetAdjustFirstTime:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M31"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.SetAdjustTwice:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M32"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.SetUseOldCommand:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M40"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
break;
|
||||
case FuqiAlignerCommand.SetUseNewCommand:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M41"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (cmd.Contains("A"))
|
||||
{
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M14"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
}
|
||||
if (cmd.Contains("B"))
|
||||
{
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M15"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
}
|
||||
if (cmd.Contains("T"))
|
||||
{
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M16"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.OnActionDone();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+725
@@ -0,0 +1,725 @@
|
||||
using System;
|
||||
using Aitex.Core.RT.Log;
|
||||
using Aitex.Core.RT.Event;
|
||||
using Aitex.Core.RT.DataCenter;
|
||||
using Aitex.Core.Util;
|
||||
|
||||
using Aitex.Sorter.Common;
|
||||
using Aitex.Core.RT.Device;
|
||||
using MECF.Framework.Common.Communications;
|
||||
using MECF.Framework.Common.SubstrateTrackings;
|
||||
using System.Collections.Generic;
|
||||
using Aitex.Core.RT.SCCore;
|
||||
using System.IO.Ports;
|
||||
using System.Threading;
|
||||
|
||||
namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.HonghuAligners
|
||||
{
|
||||
public class HonghuAligner : BaseDevice, IDevice
|
||||
{
|
||||
public enum AlignerType
|
||||
{
|
||||
Mechnical =0,
|
||||
Vaccum,
|
||||
}
|
||||
public string Address
|
||||
{
|
||||
get
|
||||
{
|
||||
return "";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsConnected
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public virtual bool Disconnect()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public virtual bool Connect()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public const string delimiter = "\r";
|
||||
|
||||
public int LastErrorCode { get; set; }
|
||||
public int Status { get; set; }
|
||||
public int ErrorCode { get; set; }
|
||||
|
||||
|
||||
public int ElapseTime { get; set; }
|
||||
|
||||
public int Notch { get; set; }
|
||||
|
||||
public bool Initalized { get; set; }
|
||||
|
||||
|
||||
private AlignerType _tazmotype;
|
||||
public AlignerType TazmoType { get => _tazmotype; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public bool Communication
|
||||
{
|
||||
get
|
||||
{
|
||||
return !_commErr;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool Error
|
||||
{
|
||||
get;set;
|
||||
|
||||
}
|
||||
|
||||
public bool Busy { get { return _connection.IsBusy || _lstHandler.Count != 0; } }
|
||||
|
||||
|
||||
public DeviceState State
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!Initalized)
|
||||
{
|
||||
return DeviceState.Unknown;
|
||||
}
|
||||
if (Error)
|
||||
{
|
||||
return DeviceState.Error;
|
||||
}
|
||||
|
||||
if (Busy)
|
||||
return DeviceState.Busy;
|
||||
|
||||
return DeviceState.Idle;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool TaExecuteSuccss
|
||||
{
|
||||
get;set;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public virtual bool WaferOnAligner
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//private int _deviceAddress;
|
||||
|
||||
|
||||
public HonghuAlignerConnection Connection
|
||||
{
|
||||
get => _connection;
|
||||
}
|
||||
private HonghuAlignerConnection _connection;
|
||||
|
||||
//private int _presetNumber;
|
||||
|
||||
private R_TRIG _trigError = new R_TRIG();
|
||||
|
||||
private R_TRIG _trigWarningMessage = new R_TRIG();
|
||||
|
||||
private R_TRIG _trigCommunicationError = new R_TRIG();
|
||||
private R_TRIG _trigRetryConnect = new R_TRIG();
|
||||
|
||||
private PeriodicJob _thread;
|
||||
private static Object _locker = new Object();
|
||||
|
||||
private LinkedList<HandlerBase> _lstHandler = new LinkedList<HandlerBase>();
|
||||
|
||||
private bool _enableLog = true;
|
||||
|
||||
private bool _commErr = false;
|
||||
|
||||
private int _defaultChuckPosition;
|
||||
//private bool _exceuteErr = false;
|
||||
//private string _addr;
|
||||
|
||||
|
||||
private DeviceTimer _timerQuery = new DeviceTimer();
|
||||
|
||||
|
||||
|
||||
private string AlarmMechanicalAlignmentError = "MechanicalAlignmentError";
|
||||
public HonghuAligner(string module, string name)
|
||||
: base()
|
||||
{
|
||||
Name = name;
|
||||
Module = module;
|
||||
|
||||
WaferManager.Instance.SubscribeLocation(name, 1);
|
||||
}
|
||||
|
||||
|
||||
public bool Initialize()
|
||||
{
|
||||
string portName = SC.GetStringValue($"{Module}.{Name}.Address");
|
||||
int bautRate = SC.GetValue<int>($"{Module}.{Name}.BaudRate");
|
||||
int dataBits = SC.GetValue<int>($"{Module}.{Name}.DataBits");
|
||||
Enum.TryParse(SC.GetStringValue($"{Module}.{Name}.Parity"), out Parity parity);
|
||||
Enum.TryParse(SC.GetStringValue($"{Module}.{Name}.StopBits"), out StopBits stopBits);
|
||||
//_deviceAddress = SC.GetValue<int>($"{Name}.DeviceAddress");
|
||||
_enableLog = SC.GetValue<bool>($"{Module}.{Name}.EnableLogMessage");
|
||||
|
||||
|
||||
_tazmotype = (AlignerType)(SC.ContainsItem($"{Name}.AlignerType") ? SC.GetValue<int>($"{Name}.AlignerType") : 0);
|
||||
_defaultChuckPosition = SC.ContainsItem("Aligner.DefaultChuckPosition") ?
|
||||
SC.GetValue<int>("Aligner.DefaultChuckPosition") : 1;
|
||||
|
||||
_connection = new HonghuAlignerConnection(portName, bautRate, dataBits, parity, stopBits);
|
||||
_connection.EnableLog(_enableLog);
|
||||
|
||||
int count = SC.ContainsItem("System.ComPortRetryCount") ? SC.GetValue<int>("System.ComPortRetryCount") : 5;
|
||||
int sleep = SC.ContainsItem("System.ComPortRetryDelayTime") ? SC.GetValue<int>("System.ComPortRetryDelayTime") : 2;
|
||||
if (sleep <= 0 || sleep > 10)
|
||||
sleep = 2;
|
||||
|
||||
int retry = 0;
|
||||
do
|
||||
{
|
||||
_connection.Disconnect();
|
||||
Thread.Sleep(sleep * 1000);
|
||||
if (_connection.Connect())
|
||||
{
|
||||
EV.PostInfoLog(Module, $"{Module}.{Name} connected");
|
||||
break;
|
||||
}
|
||||
|
||||
if (count > 0 && retry++ > count)
|
||||
{
|
||||
LOG.Write($"Retry connect {Module}.{Name} stop retry.");
|
||||
EV.PostAlarmLog(Module, $"Can't connect to {Module}.{Name}.");
|
||||
break;
|
||||
}
|
||||
|
||||
Thread.Sleep(sleep * 1000);
|
||||
LOG.Write($"Retry connect {Module}.{Name} for the {retry + 1} time.");
|
||||
|
||||
} while (true);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
_thread = new PeriodicJob(100, OnTimer, $"{Module}.{Name} MonitorHandler", true);
|
||||
|
||||
|
||||
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "Init"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Init(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Reset Error");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "AlignerInit"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Init(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Reset Error");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "Home"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Home(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Reset Error");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "AlignerHome"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Home(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Reset Error");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "Reset"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Clear(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Reset Error");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "AlignerReset"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Clear(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Reset Error");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "Grip"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Grip(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Hold Wafer");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "AlignerGrip"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Grip(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Hold Wafer");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "Release"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Release(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Release Wafer");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "AlignerRelease"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Release(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Release Wafer");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "LiftUp"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = LiftUp(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Lifter Up");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "AlignerLiftUp"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = LiftUp(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Lifter Up");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "LiftDown"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = LiftDown(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Lifter Down");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "AlignerLiftDown"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = LiftDown(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Lifter Down");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "Stop"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Stop(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Stop Align");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "AlignerStop"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
bool ret = Stop(out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "Stop Align");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "Align"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
double angle = double.Parse((string)param[0]);
|
||||
bool ret = Align(angle, out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "PreAlign");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
DEVICE.Register(String.Format("{0}.{1}", Name, "AlignerAlign"), (out string reason, int time, object[] param) =>
|
||||
{
|
||||
double angle = double.Parse((string)param[0]);
|
||||
bool ret = Align(angle, out reason);
|
||||
if (ret)
|
||||
{
|
||||
reason = string.Format("{0} {1}", Name, "PreAlign");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
DATA.Subscribe($"{Name}.State", () => State);
|
||||
DATA.Subscribe($"{Name}.AlignerState", () => State.ToString());
|
||||
|
||||
DATA.Subscribe($"{Name}.Busy", () => Busy);
|
||||
|
||||
DATA.Subscribe($"{Name}.ErrorCode", () => ErrorCode);
|
||||
|
||||
DATA.Subscribe($"{Name}.Error", () => Error);
|
||||
|
||||
DATA.Subscribe($"{Name}.ElapseTime", () => ElapseTime);
|
||||
|
||||
DATA.Subscribe($"{Name}.Notch", () => Notch);
|
||||
|
||||
DATA.Subscribe($"{Name}.WaferOnAligner", () => WaferOnAligner);
|
||||
|
||||
// string str = string.Empty;
|
||||
EV.Subscribe(new EventItem(0, "Event", AlarmMechanicalAlignmentError, "Aligner error", EventLevel.Alarm, Aitex.Core.RT.Event.EventType.HostNotification));
|
||||
|
||||
// _timerQuery.Start(_queryPeriod);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool OnTimer()
|
||||
{
|
||||
try
|
||||
{
|
||||
_connection.MonitorTimeout();
|
||||
|
||||
if (!_connection.IsConnected || _connection.IsCommunicationError)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.Clear();
|
||||
}
|
||||
|
||||
_trigRetryConnect.CLK = !_connection.IsConnected;
|
||||
if (_trigRetryConnect.Q)
|
||||
{
|
||||
_connection.SetPortAddress(SC.GetStringValue($"{Name}.Address"));
|
||||
if (!_connection.Connect())
|
||||
{
|
||||
EV.PostAlarmLog(Module, $"Can not connect with {_connection.Address}, {Module}.{Name}");
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
HandlerBase handler = null;
|
||||
if (!_connection.IsBusy)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
if (_lstHandler.Count == 0)
|
||||
{
|
||||
//_lstHandler.AddLast(new SingleTransactionHandler(this, TazmoCommand.RequeststatusStatus, null));
|
||||
//_lstHandler.AddLast(new SingleTransactionHandler(this, TazmoCommand.Requeststatus2Status, null));
|
||||
}
|
||||
|
||||
if (_lstHandler.Count > 0)
|
||||
{
|
||||
handler = _lstHandler.First.Value;
|
||||
if (handler != null) _connection.Execute(handler);
|
||||
_lstHandler.RemoveFirst();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LOG.Write(ex);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Terminate()
|
||||
{
|
||||
_connection.Disconnect();
|
||||
}
|
||||
|
||||
|
||||
public void Monitor()
|
||||
{
|
||||
try
|
||||
{
|
||||
_connection.EnableLog(_enableLog);
|
||||
|
||||
_trigCommunicationError.CLK = _connection.IsCommunicationError;
|
||||
if (_trigCommunicationError.Q)
|
||||
{
|
||||
EV.PostAlarmLog(Module, $"{Module}.{Name} communication error, {_connection.LastCommunicationError}");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LOG.Write(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
_trigError.RST = true;
|
||||
_trigWarningMessage.RST = true;
|
||||
|
||||
_connection.SetCommunicationError(false, "");
|
||||
_trigCommunicationError.RST = true;
|
||||
|
||||
_enableLog = SC.GetValue<bool>($"{Module}.{Name}.EnableLogMessage");
|
||||
|
||||
_trigRetryConnect.RST = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
internal void NoteError(string reason)
|
||||
{
|
||||
_trigWarningMessage.CLK = true;
|
||||
|
||||
if (_trigWarningMessage.Q)
|
||||
|
||||
{
|
||||
|
||||
EV.PostWarningLog(Module, $"{Module}.{Name} error, {reason}");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#region Command
|
||||
public virtual bool Reset(out string reason)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.Clear();
|
||||
_lstHandler.AddLast(new RequestHandler(this, HonghuAlignerCommand.Reset));
|
||||
|
||||
}
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
public virtual bool Init(out string reason)
|
||||
{
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.Clear();
|
||||
_lstHandler.AddLast(new RequestHandler(this, HonghuAlignerCommand.Reset));
|
||||
|
||||
}
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public virtual bool Home(out string reason)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.Clear();
|
||||
_lstHandler.AddLast(new RequestHandler(this, HonghuAlignerCommand.Reset));
|
||||
|
||||
}
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public virtual bool Clear(out string reason)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.Clear();
|
||||
_lstHandler.AddLast(new RequestHandler(this, HonghuAlignerCommand.Reset));
|
||||
|
||||
}
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual bool Grip(out string reason)
|
||||
{
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.AddLast(new RequestHandler(this, HonghuAlignerCommand.RequestVacuumOn));
|
||||
|
||||
|
||||
}
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual bool Release(out string reason)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.AddLast(new RequestHandler(this, HonghuAlignerCommand.RequestVacuumOff));
|
||||
|
||||
|
||||
}
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public virtual bool LiftUp(out string reason)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.AddLast(new RequestHandler(this, HonghuAlignerCommand.RequestPlace));
|
||||
|
||||
|
||||
}
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual bool LiftDown(out string reason)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
public virtual bool MoveToReady(out string reason)
|
||||
{
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public virtual bool Stop(out string reason)
|
||||
{
|
||||
reason = string.Empty;
|
||||
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual bool Align(double angle, out string reason)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.AddLast(new RequestHandler(this, HonghuAlignerCommand.SetNotReadLM));
|
||||
_lstHandler.AddLast(new RequestHandler(this, $"B{angle.ToString()}"));
|
||||
_lstHandler.AddLast(new RequestHandler(this, HonghuAlignerCommand.SetVacuumOnAfterAln));
|
||||
_lstHandler.AddLast(new RequestHandler(this, HonghuAlignerCommand.RequestFinishPlace));
|
||||
}
|
||||
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
public virtual bool RequestPlace(out string reason)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
_lstHandler.AddLast(new RequestHandler(this, HonghuAlignerCommand.RequestPlace));
|
||||
|
||||
}
|
||||
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public virtual bool QueryStatus(out string reason)
|
||||
{
|
||||
lock (_locker)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
reason = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
using MECF.Framework.Common.Communications;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
|
||||
namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.HonghuAligners
|
||||
{
|
||||
public class HonghuAlignerMessage : AsciiMessage
|
||||
{
|
||||
public string Data { get; set; }
|
||||
}
|
||||
public class HonghuAlignerMessageBIN : BinaryMessage
|
||||
{
|
||||
public byte[] CMD { get; set; }
|
||||
public byte[] Data { get; set; }
|
||||
}
|
||||
|
||||
public class HonghuAlignerConnection : SerialPortConnectionBase
|
||||
{
|
||||
private List<byte> _lstCacheBuffer = new List<byte>();
|
||||
|
||||
public HonghuAlignerConnection(string portName, int baudRate = 9600, int dataBits = 8, Parity parity = Parity.None, StopBits stopBits = StopBits.One)
|
||||
: base(portName, baudRate, dataBits, parity, stopBits, "\r", false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override bool SendMessage(byte[] message)
|
||||
{
|
||||
_lstCacheBuffer.Clear();
|
||||
return base.SendMessage(message);
|
||||
}
|
||||
|
||||
protected override MessageBase ParseResponse(byte[] rawBuffer)
|
||||
{
|
||||
|
||||
_lstCacheBuffer.AddRange(rawBuffer);
|
||||
byte[] temps = _lstCacheBuffer.ToArray();
|
||||
HonghuAlignerMessageBIN msg = new HonghuAlignerMessageBIN();
|
||||
|
||||
msg.RawMessage = _lstCacheBuffer.ToArray();
|
||||
|
||||
if(temps.Length == 4 && temps.Last() == 0xA)
|
||||
{
|
||||
_lstCacheBuffer.Clear();
|
||||
msg.IsResponse = true;
|
||||
msg.CMD = temps.Take(3).ToArray();
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+304
@@ -0,0 +1,304 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using MECF.Framework.Common.Communications;
|
||||
|
||||
|
||||
namespace MECF.Framework.RT.EquipmentLibrary.HardwareUnits.HonghuAligners
|
||||
{
|
||||
public static class HonghuAlignerCommand
|
||||
{
|
||||
public const string Reset = "C01";
|
||||
public const string RequestPlace = "C02";
|
||||
public const string RequestFinishPlace = "C03";
|
||||
public const string RequestVacuumOn = "C04";
|
||||
public const string RequestVacuumOff = "C05";
|
||||
public const string SetWafer200mm = "C06";
|
||||
public const string SetWafer300mm = "C07";
|
||||
public const string SetVacuumOffAfterAln = "C08";
|
||||
public const string SetVacuumOnAfterAln = "C09";
|
||||
public const string SetReadLM = "C10";
|
||||
public const string SetNotReadLM = "C11";
|
||||
public const string SetAlnAngleTo180 = "C12";
|
||||
public const string SetAlnAngleTo270 = "C13";
|
||||
|
||||
/// <summary>
|
||||
/// A
|
||||
/// </summary>
|
||||
|
||||
}
|
||||
public class HonghuAlignerHandler : HandlerBase
|
||||
{
|
||||
public HonghuAligner Device { get; set; }
|
||||
|
||||
public string Command;
|
||||
|
||||
protected HonghuAlignerHandler(HonghuAligner device, string command) : base(BuildMesage(command))
|
||||
{
|
||||
Device = device;
|
||||
Command = command;
|
||||
Name = command;
|
||||
}
|
||||
|
||||
public static byte[] BuildMesage(string data)
|
||||
{
|
||||
List<byte> ret = new List<byte>();
|
||||
foreach(char c in data)
|
||||
{
|
||||
ret.Add((byte)c);
|
||||
}
|
||||
|
||||
return ret.ToArray();
|
||||
|
||||
}
|
||||
|
||||
public override bool HandleMessage(MessageBase msg, out bool transactionComplete)
|
||||
{
|
||||
HonghuAlignerMessageBIN response = msg as HonghuAlignerMessageBIN;
|
||||
ResponseMessage = msg;
|
||||
transactionComplete = false;
|
||||
if(response.IsResponse)
|
||||
{
|
||||
|
||||
SetState(EnumHandlerState.Completed);
|
||||
transactionComplete = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public enum MotionStatus
|
||||
{
|
||||
None,
|
||||
Complete,
|
||||
Fail,
|
||||
}
|
||||
public class ResetHandler : HonghuAlignerHandler
|
||||
{
|
||||
public ResetHandler(HonghuAligner device, string command) : base(device, BuildData(command))
|
||||
{
|
||||
_xAxisStatus = MotionStatus.None;
|
||||
_yAxisStatus = MotionStatus.None;
|
||||
_zAxisStatus = MotionStatus.None;
|
||||
}
|
||||
private MotionStatus _xAxisStatus;
|
||||
private MotionStatus _yAxisStatus;
|
||||
private MotionStatus _zAxisStatus;
|
||||
|
||||
private static string BuildData(string command)
|
||||
{
|
||||
return command;
|
||||
}
|
||||
|
||||
public override bool HandleMessage(MessageBase msg, out bool transactionComplete)
|
||||
{
|
||||
HonghuAlignerMessageBIN response = msg as HonghuAlignerMessageBIN;
|
||||
ResponseMessage = msg;
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = false;
|
||||
if (response.IsAck)
|
||||
{
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("X01"))
|
||||
_xAxisStatus = MotionStatus.Complete;
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("X02"))
|
||||
_xAxisStatus = MotionStatus.Fail;
|
||||
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("Y01"))
|
||||
_yAxisStatus = MotionStatus.Complete;
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("Y02"))
|
||||
_yAxisStatus = MotionStatus.Fail;
|
||||
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("Z01"))
|
||||
_zAxisStatus = MotionStatus.Complete;
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("Z02"))
|
||||
_zAxisStatus = MotionStatus.Fail;
|
||||
|
||||
SetState(EnumHandlerState.Completed);
|
||||
|
||||
|
||||
if (_xAxisStatus == MotionStatus.Complete &&
|
||||
_yAxisStatus == MotionStatus.Complete &&
|
||||
_zAxisStatus == MotionStatus.Complete) Device.TaExecuteSuccss = true;
|
||||
|
||||
if(_xAxisStatus != MotionStatus.None &&
|
||||
_yAxisStatus != MotionStatus.None &&
|
||||
_zAxisStatus != MotionStatus.None) transactionComplete = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public class RequestHandler: HonghuAlignerHandler
|
||||
{
|
||||
private string cmd;
|
||||
public RequestHandler(HonghuAligner device,string command): base(device, BuildData(command))
|
||||
{
|
||||
cmd = command;
|
||||
}
|
||||
private static string BuildData(string command)
|
||||
{
|
||||
return command;
|
||||
}
|
||||
|
||||
public override bool HandleMessage(MessageBase msg, out bool transactionComplete)
|
||||
{
|
||||
HonghuAlignerMessageBIN response = msg as HonghuAlignerMessageBIN;
|
||||
ResponseMessage = msg;
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = false;
|
||||
if (response.IsResponse)
|
||||
{
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case HonghuAlignerCommand.RequestPlace:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M06"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M07"))
|
||||
{
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.RequestFinishPlace:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M08"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M09"))
|
||||
{
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.RequestVacuumOn:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M01"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M02"))
|
||||
{
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.RequestVacuumOff:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M03"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M04"))
|
||||
{
|
||||
Device.TaExecuteSuccss = false;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.Reset :
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M05"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
Device.Initalized = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.SetWafer200mm:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M10"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.SetWafer300mm:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M10"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.SetVacuumOffAfterAln:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M11"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.SetVacuumOnAfterAln:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M11"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.SetNotReadLM:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M13"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.SetReadLM:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M13"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.SetAlnAngleTo180:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M12"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
case HonghuAlignerCommand.SetAlnAngleTo270:
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M12"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(cmd.Contains("A"))
|
||||
{
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M14"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
}
|
||||
if (cmd.Contains("B"))
|
||||
{
|
||||
if (Encoding.ASCII.GetString(response.CMD).Contains("M15"))
|
||||
{
|
||||
Device.TaExecuteSuccss = true;
|
||||
transactionComplete = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user