Exemplo n.º 1
0
        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 ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                    var lpa = halContext.HalDevices[EnumMacDeviceId.loadportA_assembly.ToString()] as MacHalLoadPort;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    mt.HalConnect();
                    lpa.HalConnect();
                    ic.HalConnect();

                    ic.Initial();

                    //1. Mask Robot (無夾持光罩) 從Home點移動至Inspection Chamber
                    ic.SetRobotIntrude(true);
                    mt.RobotMoving(true);
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.RobotMoving(false);

                    //2. 雷射sensor可以偵測到Mask Robot進入Inspection Chamber & 報值
                    var about  = ic.ReadRobotPosLeftRight();
                    var UpDown = ic.ReadRobotPosUpDown();


                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICHomePathFile());
                    ic.SetRobotIntrude(false);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    mt.RobotMoving(false);
                }
            }
            catch (Exception ex) { throw ex; }
        }
Exemplo n.º 2
0
        public void TestMethod2()//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 ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                    var lpa = halContext.HalDevices[EnumMacDeviceId.loadportA_assembly.ToString()] as MacHalLoadPort;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    mt.HalConnect();
                    lpa.HalConnect();
                    ic.HalConnect();

                    ic.Initial();

                    //1. 光罩放置於Inspection Chamber Stage上

                    //2. Mask Robot從Home點移動至Inspection Chamber
                    ic.SetRobotIntrude(true);
                    mt.RobotMoving(true);
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile());
                    mt.RobotMoving(false);

                    //3. Mask Robot在Inspection Chamber 內進行光罩夾取
                    mt.Clamp(1);

                    //4. Mask Robot將光罩從Inspection Chamber移動至Load Port A處 (不放置)
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromICStageToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICHomePathFile());
                    ic.SetRobotIntrude(false);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    mt.ExePathMove(pathFileObj.FromLPHomeToLP1PathFile());
                    mt.RobotMoving(false);

                    //5. Mask Robot將光罩從Load Port A, 移回Inspection Chamber
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromLP1ToLPHomePathFile());
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile());
                    mt.RobotMoving(false);

                    //6. Mask Robot將光罩放置於Inspection Chamber Stage上
                    mt.Unclamp();

                    //7. Mask Robot (無夾持光罩) 從Inspection Chamber移回Home點
                    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; }
        }
Exemplo n.º 3
0
        public void TestMethod2()//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;
                    var ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    mt.HalConnect();
                    cc.HalConnect();
                    ic.HalConnect();

                    //1. 光罩放置於Inspection Chamber Stage上

                    //2. Mask Robot從Home點移動至Inspection Chamber
                    mt.RobotMoving(true);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile());
                    mt.RobotMoving(false);

                    //3. Mask Robot在Inspection Chamber 內進行光罩夾取
                    mt.Clamp(1);

                    //4. Mask Robot將光罩從Inspection Chamber移動至Clean Chamber內
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromICStageToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICHomePathFile());
                    ic.SetRobotIntrude(false);
                    mt.ChangeDirection(pathFileObj.CleanChHomePathFile());
                    mt.ExePathMove(pathFileObj.FromCCHomeToCCBackSidePathFile());
                    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.FromCCBackSideToCleanPathFile());
                    mt.ExePathMove(pathFileObj.FromBackSideCleanFinishToCCPathFile());
                    mt.ExePathMove(pathFileObj.FromCCBackSideToCapturePathFile());
                    mt.ExePathMove(pathFileObj.FromBackSideCaptureFinishToCCPathFile());
                    mt.RobotMoving(false);

                    //7. 將光罩移動至安全光柵附近, 可觸發光柵報值(由人員手動遮斷)
                    var LightCurtain = cc.ReadLightCurtain();

                    //8. Mask Robot將光罩從Clean Chamber, 移回Inspection Chamber
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromCCBackSideToCCHomePathFile());
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile());
                    mt.RobotMoving(false);

                    //9. Mask Robot將光罩放置於Inspection Chamber Stage上
                    mt.Unclamp();

                    //10.Mask Robot(無夾持光罩) 從Inspection Chamber移回Home點
                    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; }
        }
Exemplo n.º 4
0
        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 ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                    var os  = halContext.HalDevices[EnumMacDeviceId.openstage_assembly.ToString()] as MacHalOpenStage;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    mt.HalConnect();
                    ic.HalConnect();
                    os.HalConnect();

                    uint BoxType = 1;//1:鐵盒 , 2:水晶盒

                    os.Initial();

                    //1. 光罩放置於Open Stage上的光罩鐵盒內
                    os.SetBoxType(BoxType);
                    os.SortClamp();
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();
                    var BoxWeight = os.ReadWeightOnStage();
                    if (os.ReadCoverSensor().Item2 == false)
                    {
                        throw new Exception("Box status was not closed");
                    }
                    os.Close();
                    os.Clamp();
                    os.Open();
                    if (os.ReadCoverSensor().Item1 == false)
                    {
                        throw new Exception("Box status was not opened");
                    }

                    //2. (編號9 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(85); //bar 0~255
                    os.LightForSideBarDfsSetValue(3);   //bar 0~255
                    os.LightForTopBarDfsSetValue(50);   //bar 0~255
                    os.Camera_Top_CapToSave("D:/Image/OS/Top", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    os.LightForSideBarDfsSetValue(0);
                    os.LightForTopBarDfsSetValue(0);

                    //3. (編號12 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(85); //bar 0~255
                    os.LightForSideBarDfsSetValue(250); //bar 0~255
                    os.LightForTopBarDfsSetValue(20);   //bar 0~255
                    os.Camera_Side_CapToSave("D:/Image/OS/Side", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    os.LightForSideBarDfsSetValue(0);
                    os.LightForTopBarDfsSetValue(0);

                    //4. Mask Robot從Home點移動至Open Stage
                    mt.RobotMoving(true);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    os.SetRobotIntrude(false, true);
                    mt.ExePathMove(pathFileObj.FromLPHomeToOSPathFile());
                    if (BoxType == 1)
                    {
                        mt.ExePathMove(pathFileObj.FromOSToIronBoxPathFile());
                    }
                    else if (BoxType == 2)
                    {
                        mt.ExePathMove(pathFileObj.FromOSToCrystalBoxPathFile());
                    }
                    mt.RobotMoving(false);

                    //5. Mask Robot上的傾斜角度傳感器可報值 & 位於水平狀態
                    var Level = mt.ReadLevel();

                    //6. Mask Robot在Open Stage進行光罩夾取(clamp光罩)
                    mt.Clamp(1);

                    //7. Mask Robot將光罩從Open Stage移動至Inspection Chamber Entry處
                    mt.RobotMoving(true);
                    if (BoxType == 1)
                    {
                        mt.ExePathMove(pathFileObj.FromIronBoxToOSPathFile());
                    }
                    else if (BoxType == 2)
                    {
                        mt.ExePathMove(pathFileObj.FromCrystalBoxToOSPathFile());
                    }
                    mt.ExePathMove(pathFileObj.FromOSToLPHomePathFile());
                    os.SetRobotIntrude(false, false);
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile());
                    mt.RobotMoving(false);

                    //8. Mask Robot將光罩從Inspection Chamber Entry處, 移回Open Stage
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromICStageToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICHomePathFile());
                    ic.SetRobotIntrude(false);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    os.SetRobotIntrude(false, true);
                    mt.ExePathMove(pathFileObj.FromLPHomeToOSPathFile());
                    if (BoxType == 1)
                    {
                        mt.ExePathMove(pathFileObj.FromOSToIronBoxPathFile());
                    }
                    else if (BoxType == 2)
                    {
                        mt.ExePathMove(pathFileObj.FromOSToCrystalBoxPathFile());
                    }
                    mt.RobotMoving(false);

                    //9. Mask Robot將光罩放置於Open Stage上的光罩鐵盒內(release光罩)
                    mt.Unclamp();

                    //10. Mask Robot(無夾持光罩) 從Open Stage移回Home點
                    mt.RobotMoving(true);
                    if (BoxType == 1)
                    {
                        mt.ExePathMove(pathFileObj.FromIronBoxToOSPathFile());
                    }
                    else if (BoxType == 2)
                    {
                        mt.ExePathMove(pathFileObj.FromCrystalBoxToOSPathFile());
                    }
                    mt.ExePathMove(pathFileObj.FromOSToLPHomePathFile());
                    os.SetRobotIntrude(false, false);
                    mt.RobotMoving(false);

                    //11. (編號9 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(85); //bar 0~255
                    os.LightForSideBarDfsSetValue(3);   //bar 0~255
                    os.LightForTopBarDfsSetValue(50);   //bar 0~255
                    os.Camera_Top_CapToSave("D:/Image/OS/Top", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    os.LightForSideBarDfsSetValue(0);
                    os.LightForTopBarDfsSetValue(0);

                    //12. (編號12 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(85); //bar 0~255
                    os.LightForSideBarDfsSetValue(250); //bar 0~255
                    os.LightForTopBarDfsSetValue(20);   //bar 0~255
                    os.Camera_Side_CapToSave("D:/Image/OS/Side", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    os.LightForSideBarDfsSetValue(0);
                    os.LightForTopBarDfsSetValue(0);


                    os.Close();
                    os.Unclamp();
                    os.Vacuum(false);
                    os.Lock();


                    BoxType = 2;

                    //13. 重複1~12, 完成光罩水晶盒內的光罩clamp & release測試
                    //1. 光罩放置於Open Stage上的光罩水晶盒內
                    os.SetBoxType(BoxType);
                    os.SortClamp();
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();
                    BoxWeight = os.ReadWeightOnStage();

                    if (os.ReadCoverSensor().Item2 == false)
                    {
                        throw new Exception("Box status was not closed");
                    }
                    os.Close();
                    os.Clamp();
                    os.Open();
                    if (os.ReadCoverSensor().Item1 == false)
                    {
                        throw new Exception("Box status was not opened");
                    }

                    //2. (編號9 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(85); //bar 0~255
                    os.LightForSideBarDfsSetValue(3);   //bar 0~255
                    os.LightForTopBarDfsSetValue(50);   //bar 0~255
                    os.Camera_Top_CapToSave("D:/Image/OS/Top", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    os.LightForSideBarDfsSetValue(0);
                    os.LightForTopBarDfsSetValue(0);

                    //3. (編號12 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(85); //bar 0~255
                    os.LightForSideBarDfsSetValue(250); //bar 0~255
                    os.LightForTopBarDfsSetValue(20);   //bar 0~255
                    os.Camera_Side_CapToSave("D:/Image/OS/Side", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    os.LightForSideBarDfsSetValue(0);
                    os.LightForTopBarDfsSetValue(0);

                    //4. Mask Robot從Home點移動至Open Stage
                    mt.RobotMoving(true);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    os.SetRobotIntrude(false, true);
                    mt.ExePathMove(pathFileObj.FromLPHomeToOSPathFile());
                    if (BoxType == 1)
                    {
                        mt.ExePathMove(pathFileObj.FromOSToIronBoxPathFile());
                    }
                    else if (BoxType == 2)
                    {
                        mt.ExePathMove(pathFileObj.FromOSToCrystalBoxPathFile());
                    }
                    mt.RobotMoving(false);

                    //5. Mask Robot上的傾斜角度傳感器可報值 & 位於水平狀態
                    Level = mt.ReadLevel();

                    //6. Mask Robot在Open Stage進行光罩夾取(clamp光罩)
                    mt.Clamp(1);

                    //7. Mask Robot將光罩從Open Stage移動至Inspection Chamber Entry處
                    mt.RobotMoving(true);
                    if (BoxType == 1)
                    {
                        mt.ExePathMove(pathFileObj.FromIronBoxToOSPathFile());
                    }
                    else if (BoxType == 2)
                    {
                        mt.ExePathMove(pathFileObj.FromCrystalBoxToOSPathFile());
                    }
                    mt.ExePathMove(pathFileObj.FromOSToLPHomePathFile());
                    os.SetRobotIntrude(false, false);
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile());
                    mt.RobotMoving(false);

                    //8. Mask Robot將光罩從Inspection Chamber Entry處, 移回Open Stage
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromICStageToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICHomePathFile());
                    ic.SetRobotIntrude(false);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    os.SetRobotIntrude(false, true);
                    mt.ExePathMove(pathFileObj.FromLPHomeToOSPathFile());
                    if (BoxType == 1)
                    {
                        mt.ExePathMove(pathFileObj.FromOSToIronBoxPathFile());
                    }
                    else if (BoxType == 2)
                    {
                        mt.ExePathMove(pathFileObj.FromOSToCrystalBoxPathFile());
                    }
                    mt.RobotMoving(false);

                    //9. Mask Robot將光罩放置於Open Stage上的光罩水晶盒內(release光罩)
                    mt.Unclamp();

                    //10. Mask Robot(無夾持光罩) 從Open Stage移回Home點
                    mt.RobotMoving(true);
                    if (BoxType == 1)
                    {
                        mt.ExePathMove(pathFileObj.FromIronBoxToOSPathFile());
                    }
                    else if (BoxType == 2)
                    {
                        mt.ExePathMove(pathFileObj.FromCrystalBoxToOSPathFile());
                    }
                    mt.ExePathMove(pathFileObj.FromOSToLPHomePathFile());
                    os.SetRobotIntrude(false, false);
                    mt.RobotMoving(false);

                    //11. (編號9 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(85); //bar 0~255
                    os.LightForSideBarDfsSetValue(3);   //bar 0~255
                    os.LightForTopBarDfsSetValue(50);   //bar 0~255
                    os.Camera_Top_CapToSave("D:/Image/OS/Top", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    os.LightForSideBarDfsSetValue(0);
                    os.LightForTopBarDfsSetValue(0);

                    //12. (編號12 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(85); //bar 0~255
                    os.LightForSideBarDfsSetValue(250); //bar 0~255
                    os.LightForTopBarDfsSetValue(20);   //bar 0~255
                    os.Camera_Side_CapToSave("D:/Image/OS/Side", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    os.LightForSideBarDfsSetValue(0);
                    os.LightForTopBarDfsSetValue(0);


                    os.Close();
                    os.Unclamp();
                    os.Vacuum(false);
                    os.Lock();
                }
            }
            catch (Exception ex) { throw ex; }
        }
Exemplo n.º 5
0
        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 ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    mt.HalConnect();
                    ic.HalConnect();

                    ic.Initial();

                    //1. 光罩放置於Inspection Chamber Stage上

                    //2. (編號2-CCD): 開啟光源 -> 拍照(FOV正確) -> 關閉光源
                    ic.LightForBackLineSetValue(120);
                    ic.Camera_SideDfs_CapToSave("D:/Image/IC/SigeDfs", "jpg");
                    ic.LightForBackLineSetValue(0);

                    //3. (編號3-CCD): 開啟光源 -> 拍照(FOV正確) -> 關閉光源
                    ic.LightForLeftLineSetValue(255);
                    ic.LightForBackLineSetValue(255);
                    ic.LightForTopCrlDfsSetValue(39);
                    ic.Camera_TopDfs_CapToSave("D:/Image/IC/TopDfs", "jpg");
                    ic.LightForLeftLineSetValue(0);
                    ic.LightForBackLineSetValue(0);
                    ic.LightForTopCrlDfsSetValue(0);

                    //4. Mask Robot從Home點移動至Inspection Chamber
                    mt.RobotMoving(true);
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile());
                    mt.RobotMoving(false);

                    //5. 雷射sensor可以偵測到Mask Robot進入Inspection Chamber &報值
                    var About  = ic.ReadRobotPosLeftRight();
                    var UpDown = ic.ReadRobotPosUpDown();

                    //6. Mask Robot在Inspection Chamber 內進行光罩夾取
                    mt.Clamp(1);

                    //7. Mask Robot將光罩從Inspection Chamber移動至Load Port A/ B Entry處
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromICStageToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICHomePathFile());
                    ic.SetRobotIntrude(false);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    mt.ExePathMove(pathFileObj.FromLPHomeToLP1PathFile());
                    mt.ExePathMove(pathFileObj.FromLP1ToLPHomePathFile());
                    mt.ExePathMove(pathFileObj.FromLPHomeToLP2PathFile());
                    mt.RobotMoving(false);

                    //8. Mask Robot將光罩從Load Port A / B Entry處, 移回Inspection Chamber
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromLP2ToLPHomePathFile());
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile());
                    mt.RobotMoving(false);

                    //9. 雷射sensor可以偵測到Mask Robot進入Inspection Chamber &報值
                    About  = ic.ReadRobotPosLeftRight();
                    UpDown = ic.ReadRobotPosUpDown();

                    //10. Mask Robot將光罩放置於Inspection Chamber Stage上
                    mt.Unclamp();

                    //11. (編號2-CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    ic.LightForBackLineSetValue(120);
                    ic.Camera_SideDfs_CapToSave("D:/Image/IC/SigeDfs", "jpg");
                    ic.LightForBackLineSetValue(0);

                    //12. (編號3-CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    ic.LightForLeftLineSetValue(255);
                    ic.LightForBackLineSetValue(255);
                    ic.LightForTopCrlDfsSetValue(39);
                    ic.Camera_TopDfs_CapToSave("D:/Image/IC/TopDfs", "jpg");
                    ic.LightForLeftLineSetValue(0);
                    ic.LightForBackLineSetValue(0);
                    ic.LightForTopCrlDfsSetValue(0);

                    //13. Mask Robot(無夾持光罩) 從Inspection Chamber移回Home點
                    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; }
        }
Exemplo n.º 6
0
        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; }
        }
Exemplo n.º 7
0
        public void TestMethod2()//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 ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                    var os  = halContext.HalDevices[EnumMacDeviceId.openstage_assembly.ToString()] as MacHalOpenStage;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    mt.HalConnect();
                    os.HalConnect();
                    ic.HalConnect();

                    uint BoxType = 1;//1:鐵盒 , 2:水晶盒

                    ic.Initial();

                    //1. 光罩放置於Inspection Chamber Stage上

                    //2. Mask Robot從Home點移動至Inspection Chamber
                    mt.RobotMoving(true);
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile());
                    mt.RobotMoving(false);

                    //3. Mask Robot在Inspection Chamber 內進行光罩夾取
                    mt.Clamp(1);

                    //4. Mask Robot將光罩從Inspection Chamber移動至Open Stage處 (不放置)
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromICStageToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICHomePathFile());
                    ic.SetRobotIntrude(false);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    os.SetRobotIntrude(false, true);
                    mt.ExePathMove(pathFileObj.FromLPHomeToOSPathFile());
                    if (BoxType == 1)
                    {
                        mt.ExePathMove(pathFileObj.FromOSToIronBoxPathFile());
                    }
                    else if (BoxType == 2)
                    {
                        mt.ExePathMove(pathFileObj.FromOSToCrystalBoxPathFile());
                    }
                    mt.RobotMoving(false);

                    //5. Mask Robot將光罩從Open Stage, 移回Inspection Chamber
                    mt.RobotMoving(true);
                    if (BoxType == 1)
                    {
                        mt.ExePathMove(pathFileObj.FromIronBoxToOSPathFile());
                    }
                    else if (BoxType == 2)
                    {
                        mt.ExePathMove(pathFileObj.FromCrystalBoxToOSPathFile());
                    }
                    mt.ExePathMove(pathFileObj.FromOSToLPHomePathFile());
                    os.SetRobotIntrude(false, false);
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICStagePathFile());
                    mt.RobotMoving(false);

                    //6. Mask Robot將光罩放置於Inspection Chamber Stage上
                    mt.Unclamp();

                    //7.Mask Robot(無夾持光罩) 從Inspection Chamber移回Home點
                    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; }
        }