private void HandleAlarmReport(SECsMessage inputs) { // retrieve the Alarm Id string alarmName = inputs.DataItem["Ln"]["ALID"].Value.ToString(); // retrieve the Alarm Category string alarmCategory = inputs.DataItem["Ln"]["ALCD"].Value.ToString(); // retrieve the Alarm Description string alarmDescription = inputs.DataItem["Ln"]["ALTX"].Value.ToString(); Logger("Alarm occured! Name: " + alarmName + ", Category: " + alarmCategory + ", Description: " + alarmDescription); // Let's say we want to monitor a specific alarm occurrence in order to trigger some action // The following example shows that when MotionError occurs, Host want to query some status variable's current value. switch (alarmName) { case "MotionError": SECsItem svList = new SECsItem(); // Add the Status variables that we want to query the value back svList.Add("Potential Energy"); // SVID: 201 svList.Add("FaradayPosition"); // SVID: 203 Logger("Query Potential Energy and FaradayPosition value"); // Query equipment status variable's value by the defined svList hostController.EquipmentStatusVariables(svList); break; } }
private void HandleEventReport(SECsMessage inputs) { string eventName = inputs.DataItem["Ln"]["CEID"].Value.ToString(); // Note that in SecsToTool.Net all equipment specific Identifier such as CEID, ALID, SVID, etc are hidden to the code level. // This will greatly make our code reusable for other type of equipment. switch (eventName) { case "MaterialArrived": // CEID=2001 in our ToolModel1.xml // Assuming this event is fired when equipment detected a cassette of wafers being placed onto the LoadPort // We want to retrieve the MaterialID and ProcessState from the first report attach to this event. SECsItem materialReport = inputs.DataItem["Ln"]["Ln"][0]; // We know that in our ToolModel1.xml we only attach 1 report to this event // Retrieve the MaterialId value string MaterialId = materialReport["Ln"][0].Value.ToString(); // Retrieve the ProcessState, System will automatically find the mapping value as defined in our ToolModel1.xml // In case equipment sent some value in which mapping value is not found in the model, the original value will be returned. string ProcessState = materialReport["Ln"][1].Value.ToString(); // Now we want to Start the Lot only if the equipment state is in Standby Mode. if (ProcessState == "Standby") { // Using the QueryHostCommandParameters method to get all its parameters defined in the ToolModel1.xml // The system will automatically generate the parameter container with all the necessary format type built SECsItem parameters = hostController.QueryHostCommandParameters("Start Lot"); parameters["Lot Id"].Value = "Lot000001"; Logger("Equipment is in Standby mode! Now send Start Lot Host command to equipment"); // Send Start Lot host command to Equipment // Note: System will automatically lookup for the actual PARAM_NAME, HCMD_NAME before sending out the message hostController.HostCommand("Start Lot", parameters); } else { // We do not want to start the lot if Process state is not in Standby mode. Logger("State: " + ProcessState + ". Equipment is not in standby state. Lot will not be started"); } break; case "ProcessCompleted": // CEID=2002 in our ToolModel1.xml Logger("Process Completed"); break; } }