void EQP_CarrierIdRead(SecsMessage msg) { EAP.Report(new CarrierIDReport { LoadPortId = GetPortID((byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0]), CarrierId = (string)msg.SecsItem.Items[2].Items[0].Items[1].Items[1] }); }
void EQP_DataCollectionComplete(SecsMessage msg) { var tmpList = msg.SecsItem.Items[2].Items[0].Items[1]; var carrier_slot_port = (string)tmpList.Items[1]; var i = carrier_slot_port.IndexOf('.'); var carrierId = carrier_slot_port.Substring(0, i); var slotNo = Convert.ToByte(carrier_slot_port.Substring(i + 1, 2)); var portNo = carrier_slot_port[carrier_slot_port.Length - 1]; var processJob = GetProcessJob(carrierId, slotNo); var dc = new DataCollectionReport(processJob); var dcc = new DataCollectionCompleteReport(processJob); try { dc.AddLotData("PJL0", processJob.Id); dc.AddLotData("CJL0", carrierId); dc.AddLotData("SNL0", slotNo); dc.AddLotData("PIL0", Convert.ToByte(portNo)); dc.AddLotData("RIL0", tmpList.Items[2]); dc.AddLotData("LTL0", (uint)tmpList.Items[3] / 100); } finally { EAP.Report(dc); EAP.Report(dcc); } }
void EQP_WaferStatusChange(SecsMessage msg) { Item dataList = msg.SecsItem.Items[2].Items[0].Items[1]; string pjId = dataList.Items[0].GetValue <string>(); string carrier_slot_port = (string)dataList.Items[1]; int i = carrier_slot_port.IndexOf('.'); string carrierId = carrier_slot_port.Substring(0, i); byte slotNo = Convert.ToByte(carrier_slot_port.Substring(i + 1, 2)); string state = dataList.Items[2].GetValue <string>(); switch (state) { case "SubstLocChamber": EAP.Report(new WaferStartReport { ProcessJobId = GetProcessJob(carrierId, slotNo).Id, CarrierId = carrierId, SlotNo = slotNo }); break; case "SubstLocLowerArm": EAP.Report(new WaferEndReport { ProcessJobId = GetProcessJob(carrierId, slotNo).Id, CarrierId = carrierId, SlotNo = slotNo }); break; } }
void EQP_CarrierIDReadFail(SecsMessage msg) { byte portNo = (byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0]; EAP.Report(new CarrierIDReport { LoadPortId = GetPortID(portNo) }); }
void EQP_ProcessJobEnd(SecsMessage msg) { string id = msg.SecsItem.Items[2].Items[0].Items[1].Items[0].GetString().Trim(); EAP.Report(new ProcessJobEndReport { ProcessJobID = id }); EAP.Report(new DataCollectionCompleteReport(GetProcessJob(id))); }
void EQP_CarrierIDRead(SecsMessage msg) { var portNo = (byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0]; var carrierId = msg.SecsItem.Items[2].Items[0].Items[1].Items[1].GetString().Trim(); EAP.Report(new CarrierIDReport { LoadPortId = GetPortID(portNo), CarrierId = carrierId }); }
void EQP_CarrierIDRead(SecsMessage msg) { byte portNo = (byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0]; string carrierID = msg.SecsItem.Items[2].Items[0].Items[1].Items[1].GetValue <string>().Trim(); EAP.Report(new CarrierIDReport { LoadPortId = GetPortID(portNo), CarrierId = carrierID }); }
async void EQP_LoadComplete(SecsMessage msg) { byte portNo = (byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0]; string portId = GetPortID(portNo); EAP.Report(new LoadCompReport { PortID = portId }); // Wait CarrierIDRead Event 10 sec. { // Method 1: //ThreadPool.QueueUserWorkItem(delegate { // EapLogger.Notice(portId + " StartAsync CarrierIDRead Timer"); // using (var ev = new ManualResetEvent(false)) { // var callback = new Action<SecsMessage>(secsMsg => { // if (portNo == (byte)secsMsg.SecsItem.Items[2].Items[0].Items[1].Items[0]) // ev.Set(); // }); // using (EAP.SubscribeS6F11("CarrierIDRead", callback)) // using (EAP.SubscribeS6F11("CarrierIDReadFail", callback)) { // if (!ev.WaitOne(10000)) { // EapLogger.Error(portId + " CarrierIDRead Timeout!!"); // EAP.Report(new CarrierIDReport { // LoadPortId = portId // }); // } // } // } //}); } { // Method 2: //EapLogger.Notice(portId + " StartAsync CarrierIDRead Timer"); //var ev = new ManualResetEvent(false); //var callback = new Action<SecsMessage>(secsMsg => { // if (portNo == (byte)secsMsg.SecsItem.Items[2].Items[0].Items[1].Items[0]) // ev.Set(); //}); //var read = EAP.SubscribeS6F11("CarrierIDRead", callback); //var readfail = EAP.SubscribeS6F11("CarrierIDReadFail", callback); //ThreadPool.RegisterWaitForSingleObject(ev, (state, timeout) => { // if (read != null) // read.Dispose(); // if (readfail != null) // readfail.Dispose(); // if (timeout) { // EapLogger.Error(portId + " CarrierIDRead Timeout!!"); // EAP.Report(new CarrierIDReport { // LoadPortId = portId // }); // } //}, null, 10000, true); } }
void EQP_UnloadComplete(SecsMessage msg) { var portId = GetPortID((byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0]); EAP.Report(new UnloadCompleteReport { PortID = portId }); //清除相關Loadport上的ProcessJob物件 _ProcessingJobs.RemoveAll(pj => pj.Carriers.First().LoadPortId == portId); }
void EQP_SlotMapReport(SecsMessage msg) { byte portNo = (byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0]; string carrierID = msg.SecsItem.Items[2].Items[0].Items[1].Items[1].GetValue <string>().Trim(); var mapItem = msg.SecsItem.Items[2].Items[0].Items[1].Items[2].Items; EAP.Report(new SlotMapReport { LoadPortID = GetPortID(portNo), CarrierID = carrierID, Slots = from i in Enumerable.Range(0, mapItem.Count) where mapItem[i].GetValue <byte>() == 4 select(byte)(i + 1) }); }
void EQP_SlotMapReport(SecsMessage msg) { var portNo = (byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0]; var carrierId = (string)msg.SecsItem.Items[2].Items[0].Items[1].Items[1]; var map = (string)msg.SecsItem.Items[2].Items[0].Items[1].Items[1 + portNo]; EAP.Report(new SlotMapReport { LoadPortID = GetPortID(portNo), CarrierID = carrierId, Slots = from i in Enumerable.Range(0, map.Length) where map[i] == '1' select(byte)(i + 1) }); }
void EQP_WaferProcessData_PVD(SecsMessage msg) { Item tempList = msg.SecsItem.Items[2].Items[0].Items[1].Items[0]; string pjID = tempList.Items[1].GetValue <string>(); byte slotNo = (byte)tempList.Items[4].Items[0].Items[1]; tempList = tempList.Items[4].Items[0].Items[2].Items[0]; string chamber = tempList.Items[0].Items[1].GetValue <string>(); var dc = new DataCollectionReport(GetProcessJob(pjID)); try { dc.AddLotData("CIWW", chamber); } finally { EAP.Report(dc); } }
void EQP_DataCollection(SecsMessage msg) { var dataList = msg.SecsItem.Items[2].Items[0].Items[1]; var pjId = dataList.Items[0].GetString(); var carrier_slot_port = (string)dataList.Items[1]; var i = carrier_slot_port.IndexOf('.'); var slotNo = Convert.ToByte(carrier_slot_port.Substring(i + 1, 2)); var carrierId = carrier_slot_port.Substring(0, i); var dc = new DataCollectionReport(GetProcessJob(carrierId, slotNo)); try { dc.AddWaferData("SNW0", slotNo, slotNo); dc.AddWaferData("PTW0", slotNo, dataList.Items[2]); dc.AddWaferData("TXW0", slotNo, (uint)dataList.Items[3] / 100); dc.AddWaferData("TIW0", slotNo, (uint)dataList.Items[4] / 100); dc.AddWaferData("TAW0", slotNo, (uint)dataList.Items[5] / 100); } finally { EAP.Report(dc); } }
async Task QueryPortState() { var s1f4 = await EAP.SendAsync(EAP.SecsMessages[1, 3, "QueryPortStatus"]); for (int i = 0; i < s1f4.SecsItem.Items.Count; i++) { switch ((byte)s1f4.SecsItem.Items[i]) { case 1: EAP.Report(new ReadyToLoadReport { PortID = GetPortID(i + 1) }); break; case 3: EAP.Report(new ReadyToUnloadReport { PortID = GetPortID(i + 1) }); break; } } }
void EQP_WaferProcessData_LLH_LHC(SecsMessage msg) { Item tempList = msg.SecsItem.Items[2].Items[0].Items[1].Items[0]; string pjID = tempList.Items[1].GetValue <string>(); byte slotNo = (byte)tempList.Items[4].Items[0].Items[1]; tempList = tempList.Items[4].Items[0].Items[2].Items[0]; var dc = new DataCollectionReport(GetProcessJob(pjID)); try { dc.AddWaferData("CIWD", slotNo, tempList.Items[0].Items[1]); tempList = tempList.Items[2].Items[0].Items[2]; dc.AddWaferData("C1W1", slotNo, tempList.Items[3]); dc.AddWaferData("C1W2", slotNo, tempList.Items[6]); dc.AddWaferData("C2W1", slotNo, tempList.Items[9]); dc.AddWaferData("C2W2", slotNo, tempList.Items[12]); } finally { EAP.Report(dc); } }
void EQP_ProcessJobStart(SecsMessage msg) { EAP.Report(new ProcessJobStartReport { ProcessJobID = msg.SecsItem.Items[2].Items[0].Items[1].Items[0].GetValue <string>().Trim() }); }
void EQP_ProcessJobEnd(SecsMessage msg) { EAP.Report(new ProcessJobEndReport { ProcessJobID = (string)msg.SecsItem.Items[2].Items[0].Items[1].Items[0] }); }
void EQP_ReadyToUnload(SecsMessage msg) { EAP.Report(new ReadyToUnloadReport { PortID = GetPortID((byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0]) }); }
void EQP_ControlJobStart(SecsMessage msg) { EAP.Report(new ControlJobStartReport { ControlJobID = (string)msg.SecsItem.Items[2].Items[0].Items[1].Items[0] }); }
void EQP_ControlJobEnd(SecsMessage msg) { EAP.Report(new ControlJobEndReport { ControlJobID = msg.SecsItem.Items[2].Items[0].Items[1].Items[1].GetValue <string>().Trim() }); }
void EQP_ControlJobStart(SecsMessage msg) { EAP.Report(new ControlJobStartReport { ControlJobID = msg.SecsItem.Items[2].Items[0].Items[1].Items[1].GetString().Trim() }); }
void EQP_LoadComplete(SecsMessage msg) { EAP.Report(new LoadCompReport { PortID = GetPortID((byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0]) }); }