|
@@ -92,41 +92,42 @@ namespace CyberX8_Simulator.Devices
|
|
|
protected override void ProcessUnsplitMessage(string str)
|
|
|
{
|
|
|
|
|
|
- string ack = "";
|
|
|
- if (str.StartsWith("RQ LOAD")) //查询手指是否带片
|
|
|
- {
|
|
|
- ack = "LOAD A OFF\n_RDY";
|
|
|
- }
|
|
|
- else if(str.StartsWith("RSR")) //返回扫片结果
|
|
|
- {
|
|
|
- string[] strings = str.Split(' ').ToArray();
|
|
|
- int stationNumber = int.Parse(strings[1]);
|
|
|
- if (stationNumber >= 50 && stationNumber <= 58) //LP
|
|
|
- {
|
|
|
- string lpwafer = "";
|
|
|
- foreach(var item in _slotMap)
|
|
|
- {
|
|
|
- lpwafer += $" {item}";
|
|
|
- }
|
|
|
- ack = "MAP" + lpwafer;
|
|
|
- }
|
|
|
- else if (stationNumber >= 59 && stationNumber <= 64) //dummy
|
|
|
- {
|
|
|
- string dummywafer = "";
|
|
|
- foreach (var item in _slotDummy)
|
|
|
- {
|
|
|
- dummywafer += $" {item}";
|
|
|
- }
|
|
|
- ack = "MAP" + dummywafer;
|
|
|
- }
|
|
|
- }
|
|
|
- else //默认回复
|
|
|
- {
|
|
|
- ack = str + "\n_RDY"; ;
|
|
|
- }
|
|
|
- OnWriteMessage(ack);
|
|
|
+ //string ack = "";
|
|
|
+ //if (str.StartsWith("RQ LOAD")) //查询手指是否带片
|
|
|
+ //{
|
|
|
+ // ack = "LOAD A OFF\n_RDY";
|
|
|
+ //}
|
|
|
+ //else if(str.StartsWith("RSR")) //返回扫片结果
|
|
|
+ //{
|
|
|
+ // string[] strings = str.Split(' ').ToArray();
|
|
|
+ // int stationNumber = int.Parse(strings[1]);
|
|
|
+ // if (stationNumber >= 50 && stationNumber <= 58) //LP
|
|
|
+ // {
|
|
|
+ // string lpwafer = "";
|
|
|
+ // foreach(var item in _slotMap)
|
|
|
+ // {
|
|
|
+ // lpwafer += $" {item}";
|
|
|
+ // }
|
|
|
+ // ack = "MAP" + lpwafer;
|
|
|
+ // }
|
|
|
+ // else if (stationNumber >= 59 && stationNumber <= 64) //dummy
|
|
|
+ // {
|
|
|
+ // string dummywafer = "";
|
|
|
+ // foreach (var item in _slotDummy)
|
|
|
+ // {
|
|
|
+ // dummywafer += $" {item}";
|
|
|
+ // }
|
|
|
+ // ack = "MAP" + dummywafer;
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ //else //默认回复
|
|
|
+ //{
|
|
|
+ // ack = str + "\n_RDY"; ;
|
|
|
+ //}
|
|
|
+ //OnWriteMessage(ack);
|
|
|
+
|
|
|
// 处理INF
|
|
|
- //OnWork(str);
|
|
|
+ OnWork(str);
|
|
|
}
|
|
|
internal void SetCassetteDoor(bool doorOpen)
|
|
|
{
|
|
@@ -175,131 +176,173 @@ namespace CyberX8_Simulator.Devices
|
|
|
string msg = $"EVT:SIGSTAT/System/{data:X8}/00000000;";
|
|
|
OnWriteMessage(msg);
|
|
|
}
|
|
|
- private void OnWork(string strACK)
|
|
|
+ private void OnWork(string str)
|
|
|
{
|
|
|
- // match basic
|
|
|
- Match m1 = Regex.Match(strACK, SCMD);
|
|
|
-
|
|
|
- // get mock delay time
|
|
|
- string sBasic = m1.Groups[1].Value;
|
|
|
-
|
|
|
- if (string.IsNullOrEmpty(sBasic))
|
|
|
- return;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- EfemOperation op = EfemConstant.ToOperation(sBasic);
|
|
|
- ushort millionSec = this.SimuOperationTime(op);
|
|
|
-
|
|
|
- // delay
|
|
|
- //await Task.Delay(millionSec);
|
|
|
- Thread.Sleep(millionSec);
|
|
|
-
|
|
|
- // build the INF string
|
|
|
- string strINF = string.Empty;
|
|
|
-
|
|
|
- switch (EfemConstant.ToOperation(strACK))
|
|
|
+ string ack = "";
|
|
|
+ if (str.StartsWith("RQ LOAD")) //查询手指是否带片
|
|
|
{
|
|
|
- case EfemOperation.GetWaferInfo:
|
|
|
- strINF = strACK.Replace(ACK, "INF");
|
|
|
- strINF = strINF.TrimEnd(';');
|
|
|
- string map1 = string.Join("", _slotMap);
|
|
|
- strINF += $"/{map1};";
|
|
|
- break;
|
|
|
- case EfemOperation.Home:
|
|
|
- int data1 = 0b011111111010100000;
|
|
|
- string s1 = $"EVT:SIGSTAT/LP1/00000000/00000003;\rEVT:SIGSTAT/LP2/0000000/00000003;\rEVT:SIGSTAT/LP3/000000/00000003;\rEVT:SIGSTAT/System/{data1}/00000;\r";
|
|
|
-
|
|
|
- strINF = s1 + strACK.Replace(ACK, "INF");
|
|
|
- SendSystemData();
|
|
|
- SendLP1Data();
|
|
|
- SendLP2Data();
|
|
|
- SendLP3Data();
|
|
|
- SendAlignData();
|
|
|
- OnWriteMessage(strACK.Replace(ACK, "INF"));
|
|
|
- return;
|
|
|
- case EfemOperation.Map:
|
|
|
- if(strACK.Contains("BF"))
|
|
|
- {
|
|
|
- string map = string.Join("", _slotDummy);
|
|
|
- string strEVT = strACK.Replace(ACK,"EVT");
|
|
|
- strEVT = strEVT.Replace("WAFSH","MAPDT");
|
|
|
- strEVT = strEVT.TrimEnd(';');
|
|
|
- string str = $"{strEVT}/{map};";
|
|
|
- OnWriteMessage(str);
|
|
|
- }
|
|
|
- else if (strACK.Contains("LP"))
|
|
|
- {
|
|
|
- string map = string.Join("", _slotMap);
|
|
|
- string strEVT = strACK.Replace(ACK, "EVT");
|
|
|
- strEVT = strEVT.Replace("WAFSH", "MAPDT");
|
|
|
- strEVT = strEVT.TrimEnd(';');
|
|
|
- string str = $"{strEVT}/{map};";
|
|
|
- OnWriteMessage(str);
|
|
|
- }
|
|
|
- strINF = strACK.Replace(ACK, "INF");
|
|
|
- break;
|
|
|
- case EfemOperation.Load:
|
|
|
- strINF = strACK.Replace(ACK, "INF");
|
|
|
- break;
|
|
|
- case EfemOperation.StateTrack:
|
|
|
- strINF = "INF:STATE/TRACK/NONE/NONE;";
|
|
|
- break;
|
|
|
- case EfemOperation.CarrierId:
|
|
|
-
|
|
|
-
|
|
|
- break;
|
|
|
-
|
|
|
- case EfemOperation.Size:
|
|
|
-
|
|
|
- break;
|
|
|
- case EfemOperation.Dock:
|
|
|
- Match mDock = Regex.Match(strACK, SFOUP);
|
|
|
- if (mDock.Success)
|
|
|
- {
|
|
|
- UpdateLocked(mDock.Groups[1].Value, true);
|
|
|
- }
|
|
|
- strINF = strACK.Replace(ACK, "INF");
|
|
|
- break;
|
|
|
- case EfemOperation.Undock:
|
|
|
- Match mUnDock = Regex.Match(strACK, SFOUP);
|
|
|
- if (mUnDock.Success)
|
|
|
- {
|
|
|
- UpdateLocked(mUnDock.Groups[1].Value, false);
|
|
|
- }
|
|
|
- strINF = strACK.Replace(ACK, "INF");
|
|
|
- break;
|
|
|
- case EfemOperation.Clamp:
|
|
|
- Match mClamp= Regex.Match(strACK, SFOUP);
|
|
|
- if (mClamp.Success)
|
|
|
+ ack = "LOAD A OFF\n_RDY";
|
|
|
+ }
|
|
|
+ else if (str.StartsWith("RSR")) //返回扫片结果
|
|
|
+ {
|
|
|
+ string[] strings = str.Split(' ').ToArray();
|
|
|
+ int stationNumber = int.Parse(strings[1]);
|
|
|
+ if (stationNumber >= 50 && stationNumber <= 58) //LP
|
|
|
+ {
|
|
|
+ string lpwafer = "";
|
|
|
+ foreach (var item in _slotMap)
|
|
|
{
|
|
|
- UpdateClamped(mClamp.Groups[1].Value, true);
|
|
|
+ lpwafer += $" {item}";
|
|
|
}
|
|
|
- strINF = strACK.Replace(ACK, "INF");
|
|
|
- break;
|
|
|
- case EfemOperation.Unclamp:
|
|
|
- Match mUnClamp = Regex.Match(strACK, SFOUP);
|
|
|
- if (mUnClamp.Success)
|
|
|
+ ack = "MAP" + lpwafer;
|
|
|
+ }
|
|
|
+ else if (stationNumber >= 59 && stationNumber <= 64) //dummy
|
|
|
+ {
|
|
|
+ string dummywafer = "";
|
|
|
+ foreach (var item in _slotDummy)
|
|
|
{
|
|
|
- UpdateClamped(mUnClamp.Groups[1].Value, false);
|
|
|
+ dummywafer += $" {item}";
|
|
|
}
|
|
|
- strINF = strACK.Replace(ACK, "INF");
|
|
|
- break;
|
|
|
- case EfemOperation.Speed:
|
|
|
-
|
|
|
- break;
|
|
|
- case EfemOperation.Align:
|
|
|
- case EfemOperation.Pick:
|
|
|
- case EfemOperation.Place:
|
|
|
- case EfemOperation.Orgsh:
|
|
|
- case EfemOperation.Light:
|
|
|
- case EfemOperation.SigStatus:
|
|
|
- default:
|
|
|
- strINF = strACK.Replace(ACK, "INF");
|
|
|
- break;
|
|
|
+ ack = "MAP" + dummywafer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else //默认回复
|
|
|
+ {
|
|
|
+ if (str.StartsWith("PICK") || str.StartsWith("PLACE") || str.StartsWith("MAP"))
|
|
|
+ {
|
|
|
+ Thread.Sleep((ushort)3000);
|
|
|
+ }
|
|
|
+ ack = str + "\n_RDY"; ;
|
|
|
}
|
|
|
+ OnWriteMessage(ack);
|
|
|
+ //if (strACK.StartsWith("PICK") || strACK.StartsWith("PLACE") || strACK.StartsWith("MAP"))
|
|
|
+ //{
|
|
|
+ // Thread.Sleep((ushort)3000);
|
|
|
+ //}
|
|
|
+ //// match basic
|
|
|
+ //Match m1 = Regex.Match(strACK, SCMD);
|
|
|
+
|
|
|
+ //// get mock delay time
|
|
|
+ //string sBasic = m1.Groups[1].Value;
|
|
|
+
|
|
|
+ //if (string.IsNullOrEmpty(sBasic))
|
|
|
+ // return;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //EfemOperation op = EfemConstant.ToOperation(sBasic);
|
|
|
+ //ushort millionSec = this.SimuOperationTime(op);
|
|
|
+
|
|
|
+ //// delay
|
|
|
+ ////await Task.Delay(millionSec);
|
|
|
+ //Thread.Sleep(millionSec);
|
|
|
+
|
|
|
+ //// build the INF string
|
|
|
+ //string strINF = string.Empty;
|
|
|
+
|
|
|
+ //switch (EfemConstant.ToOperation(strACK))
|
|
|
+ //{
|
|
|
+ // case EfemOperation.GetWaferInfo:
|
|
|
+ // strINF = strACK.Replace(ACK, "INF");
|
|
|
+ // strINF = strINF.TrimEnd(';');
|
|
|
+ // string map1 = string.Join("", _slotMap);
|
|
|
+ // strINF += $"/{map1};";
|
|
|
+ // break;
|
|
|
+ // case EfemOperation.Home:
|
|
|
+ // int data1 = 0b011111111010100000;
|
|
|
+ // string s1 = $"EVT:SIGSTAT/LP1/00000000/00000003;\rEVT:SIGSTAT/LP2/0000000/00000003;\rEVT:SIGSTAT/LP3/000000/00000003;\rEVT:SIGSTAT/System/{data1}/00000;\r";
|
|
|
+
|
|
|
+ // strINF = s1 + strACK.Replace(ACK, "INF");
|
|
|
+ // SendSystemData();
|
|
|
+ // SendLP1Data();
|
|
|
+ // SendLP2Data();
|
|
|
+ // SendLP3Data();
|
|
|
+ // SendAlignData();
|
|
|
+ // OnWriteMessage(strACK.Replace(ACK, "INF"));
|
|
|
+ // return;
|
|
|
+ // case EfemOperation.Map:
|
|
|
+ // if(strACK.Contains("BF"))
|
|
|
+ // {
|
|
|
+ // string map = string.Join("", _slotDummy);
|
|
|
+ // string strEVT = strACK.Replace(ACK,"EVT");
|
|
|
+ // strEVT = strEVT.Replace("WAFSH","MAPDT");
|
|
|
+ // strEVT = strEVT.TrimEnd(';');
|
|
|
+ // string str = $"{strEVT}/{map};";
|
|
|
+ // OnWriteMessage(str);
|
|
|
+ // }
|
|
|
+ // else if (strACK.Contains("LP"))
|
|
|
+ // {
|
|
|
+ // string map = string.Join("", _slotMap);
|
|
|
+ // string strEVT = strACK.Replace(ACK, "EVT");
|
|
|
+ // strEVT = strEVT.Replace("WAFSH", "MAPDT");
|
|
|
+ // strEVT = strEVT.TrimEnd(';');
|
|
|
+ // string str = $"{strEVT}/{map};";
|
|
|
+ // OnWriteMessage(str);
|
|
|
+ // }
|
|
|
+ // strINF = strACK.Replace(ACK, "INF");
|
|
|
+ // break;
|
|
|
+ // case EfemOperation.Load:
|
|
|
+ // strINF = strACK.Replace(ACK, "INF");
|
|
|
+ // break;
|
|
|
+ // case EfemOperation.StateTrack:
|
|
|
+ // strINF = "INF:STATE/TRACK/NONE/NONE;";
|
|
|
+ // break;
|
|
|
+ // case EfemOperation.CarrierId:
|
|
|
+
|
|
|
+
|
|
|
+ // break;
|
|
|
+
|
|
|
+ // case EfemOperation.Size:
|
|
|
+
|
|
|
+ // break;
|
|
|
+ // case EfemOperation.Dock:
|
|
|
+ // Match mDock = Regex.Match(strACK, SFOUP);
|
|
|
+ // if (mDock.Success)
|
|
|
+ // {
|
|
|
+ // UpdateLocked(mDock.Groups[1].Value, true);
|
|
|
+ // }
|
|
|
+ // strINF = strACK.Replace(ACK, "INF");
|
|
|
+ // break;
|
|
|
+ // case EfemOperation.Undock:
|
|
|
+ // Match mUnDock = Regex.Match(strACK, SFOUP);
|
|
|
+ // if (mUnDock.Success)
|
|
|
+ // {
|
|
|
+ // UpdateLocked(mUnDock.Groups[1].Value, false);
|
|
|
+ // }
|
|
|
+ // strINF = strACK.Replace(ACK, "INF");
|
|
|
+ // break;
|
|
|
+ // case EfemOperation.Clamp:
|
|
|
+ // Match mClamp= Regex.Match(strACK, SFOUP);
|
|
|
+ // if (mClamp.Success)
|
|
|
+ // {
|
|
|
+ // UpdateClamped(mClamp.Groups[1].Value, true);
|
|
|
+ // }
|
|
|
+ // strINF = strACK.Replace(ACK, "INF");
|
|
|
+ // break;
|
|
|
+ // case EfemOperation.Unclamp:
|
|
|
+ // Match mUnClamp = Regex.Match(strACK, SFOUP);
|
|
|
+ // if (mUnClamp.Success)
|
|
|
+ // {
|
|
|
+ // UpdateClamped(mUnClamp.Groups[1].Value, false);
|
|
|
+ // }
|
|
|
+ // strINF = strACK.Replace(ACK, "INF");
|
|
|
+ // break;
|
|
|
+ // case EfemOperation.Speed:
|
|
|
+
|
|
|
+ // break;
|
|
|
+ // case EfemOperation.Align:
|
|
|
+ // case EfemOperation.Pick:
|
|
|
+ // case EfemOperation.Place:
|
|
|
+ // case EfemOperation.Orgsh:
|
|
|
+ // case EfemOperation.Light:
|
|
|
+ // case EfemOperation.SigStatus:
|
|
|
+ // default:
|
|
|
+ // strINF = strACK.Replace(ACK, "INF");
|
|
|
+ // break;
|
|
|
+ //}
|
|
|
+
|
|
|
+ //OnWriteMessage(strINF);
|
|
|
|
|
|
- OnWriteMessage(strINF);
|
|
|
}
|
|
|
|
|
|
private void UpdateLocked(string lpNumber,bool locked)
|