public void TestMethod1()//OK { try { using (var halContext = new MacHalContext("UserData/Manifest/Manifest.xml.real")) { halContext.MvaCfBootup(); halContext.MvaCfLoad(); var unv = halContext.HalDevices[EnumMacDeviceId.eqp_assembly.ToString()] as MacHalEqp; var mt = halContext.HalDevices[EnumMacDeviceId.masktransfer_assembly.ToString()] as MacHalMaskTransfer; var cc = halContext.HalDevices[EnumMacDeviceId.clean_assembly.ToString()] as MacHalCleanCh; unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功 mt.HalConnect(); cc.HalConnect(); //1. 光罩放置於Load Port A的Pod上 //2.Mask Robot從Home點移動至Load Port A mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromLPHomeToLP1PathFile()); mt.RobotMoving(false); //3. Mask Robot在Load Port A的Pod 內進行光罩夾取 mt.Clamp(1); //4. Mask Robot將光罩從Load Port A移動至Clean Chamber內 mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromLP1ToLPHomePathFile()); mt.ChangeDirection(pathFileObj.CleanChHomePathFile()); mt.ExePathMove(pathFileObj.FromCCHomeToCCFrontSidePathFile()); mt.RobotMoving(false); //5. 雷射sensor可以偵測到Mask Robot進入Clean Chamber & 報值 var About = cc.ReadRobotPosLeftRight(); var UpDown = cc.ReadRobotPosUpDown(); //6. Mask Robot模擬吹除轉動Mask行為 mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromCCFrontSideToCleanPathFile()); mt.ExePathMove(pathFileObj.FromFrontSideCleanFinishToCCPathFile()); mt.ExePathMove(pathFileObj.FromCCFrontSideToCapturePathFile()); mt.ExePathMove(pathFileObj.FromFrontSideCaptureFinishToCCPathFile()); mt.RobotMoving(false); //7. 將光罩移動至安全光柵附近, 觸發光柵報值(由人員手動遮斷) var LightCurtain = cc.ReadLightCurtain(); //8. Mask Robot將光罩從Clean Chamber, 移回Load Port A mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromCCFrontSideToCCHomePathFile()); mt.ChangeDirection(pathFileObj.LoadPortHomePathFile()); mt.ExePathMove(pathFileObj.FromLPHomeToLP1PathFile()); mt.RobotMoving(false); //9. Mask Robot將光罩放置於Load Port A Pod上 mt.Unclamp(); //10. Mask Robot (無夾持光罩) 從Load Port A移回Home點 mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromLP1ToLPHomePathFile()); mt.RobotMoving(false); About = 0; UpDown = 0; //11. 重複1~10, 執行Load Port B -> Clean Chamber光罩傳送 //1. 光罩放置於Load Port B的Pod上 //2.Mask Robot從Home點移動至Load Port B mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromLPHomeToLP2PathFile()); mt.RobotMoving(false); //3. Mask Robot在Load Port B的Pod 內進行光罩夾取 mt.Clamp(1); //4. Mask Robot將光罩從Load Port B移動至Clean Chamber內 mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromLP2ToLPHomePathFile()); mt.ChangeDirection(pathFileObj.CleanChHomePathFile()); mt.ExePathMove(pathFileObj.FromCCHomeToCCFrontSidePathFile()); mt.RobotMoving(false); //5. 雷射sensor可以偵測到Mask Robot進入Clean Chamber & 報值 About = cc.ReadRobotPosLeftRight(); UpDown = cc.ReadRobotPosUpDown(); //6. Mask Robot模擬吹除轉動Mask行為 mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromCCFrontSideToCleanPathFile()); mt.ExePathMove(pathFileObj.FromFrontSideCleanFinishToCCPathFile()); mt.ExePathMove(pathFileObj.FromCCFrontSideToCapturePathFile()); mt.ExePathMove(pathFileObj.FromFrontSideCaptureFinishToCCPathFile()); mt.RobotMoving(false); //7. 將光罩移動至安全光柵附近, 觸發光柵報值(由人員手動遮斷) LightCurtain = cc.ReadLightCurtain(); //8. Mask Robot將光罩從Clean Chamber, 移回Load Port B mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromCCFrontSideToCCHomePathFile()); mt.ChangeDirection(pathFileObj.LoadPortHomePathFile()); mt.ExePathMove(pathFileObj.FromLPHomeToLP2PathFile()); mt.RobotMoving(false); //9. Mask Robot將光罩放置於Load Port B Pod上 mt.Unclamp(); //10. Mask Robot (無夾持光罩) 從Load Port B移回Home點 mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromLP2ToLPHomePathFile()); mt.RobotMoving(false); } } catch (Exception ex) { throw ex; } }
public void TestMethod1()//OK { try { using (var halContext = new MacHalContext("UserData/Manifest/Manifest.xml.real")) { halContext.MvaCfBootup(); halContext.MvaCfLoad(); var unv = halContext.HalDevices[EnumMacDeviceId.eqp_assembly.ToString()] as MacHalEqp; var cc = halContext.HalDevices[EnumMacDeviceId.clean_assembly.ToString()] as MacHalCleanCh; var mt = halContext.HalDevices[EnumMacDeviceId.masktransfer_assembly.ToString()] as MacHalMaskTransfer; var ic = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh; unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功 cc.HalConnect(); mt.HalConnect(); ic.HalConnect(); ic.Initial(); //光罩放置於Inspection Chamber Stage上,先到Inspection Chamber夾取Mask mt.RobotMoving(true); mt.ChangeDirection(pathFileObj.InspChHomePathFile()); ic.SetRobotIntrude(true); mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile()); mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile()); mt.RobotMoving(false); mt.Clamp(1); mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromICStageToICFrontSidePathFile()); mt.ExePathMove(pathFileObj.FromICFrontSideToICHomePathFile()); ic.SetRobotIntrude(false); mt.RobotMoving(false); //1. Mask Robot夾持光罩, 並移動至Clean Chamber內 mt.RobotMoving(true); mt.ChangeDirection(pathFileObj.CleanChHomePathFile()); mt.ExePathMove(pathFileObj.FromCCHomeToCCFrontSidePathFile()); mt.ExePathMove(pathFileObj.FromCCFrontSideToCapturePathFile()); mt.RobotMoving(false); //2. (編號5 - CCD): 開啟光源->拍照(FOV正確, 可以看到particle)->關閉光源 cc.LightForInspSetValue(600); cc.Camera_Insp_CapToSave("D:/Image/CC/Insp", "jpg"); cc.LightForInspSetValue(0); //3. Mask Robot移回Home點 mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromFrontSideCaptureFinishToCCPathFile()); mt.ExePathMove(pathFileObj.FromCCFrontSideToCCHomePathFile()); mt.ChangeDirection(pathFileObj.InspChHomePathFile()); ic.SetRobotIntrude(true); mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile()); mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile()); mt.RobotMoving(false); mt.Unclamp(); mt.RobotMoving(true); mt.ExePathMove(pathFileObj.FromICStageToICFrontSidePathFile()); mt.ExePathMove(pathFileObj.FromICFrontSideToICHomePathFile()); ic.SetRobotIntrude(false); mt.ChangeDirection(pathFileObj.LoadPortHomePathFile()); mt.RobotMoving(false); } } catch (Exception ex) { throw ex; } }