コード例 #1
0
        public void TestReadComponentValue()
        {
            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 os  = halContext.HalDevices[EnumMacDeviceId.openstage_assembly.ToString()] as MacHalOpenStage;
                    unv.HalConnect();
                    os.HalConnect();

                    os.SetRobotIntrude(true, false);
                    os.SetRobotIntrude(false, true);
                    os.SetRobotIntrude(false, false);
                    os.ReadClampStatus();
                    os.ReadSortClampPosition();
                    os.ReadSliderPosition();
                    os.ReadCoverPos();
                    os.ReadCoverSensor();
                    os.ReadBoxDeform();
                    os.ReadWeightOnStage();
                    os.ReadBoxExist();
                    os.ReadOSStatus();
                    os.ReadRobotIntruded();
                    os.ReadParticleCount();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
ファイル: Ut011_LP.cs プロジェクト: cimmvteam/MvAssistant
        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 lpa = halContext.HalDevices[EnumMacDeviceId.loadportA_assembly.ToString()] as MacHalLoadPort;
                    var lpb = halContext.HalDevices[EnumMacDeviceId.loadportB_assembly.ToString()] as MacHalLoadPort;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    lpb.HalConnect();
                    lpa.HalConnect();

                    //1.POD內有光罩, 且放置於Load Port A stage上

                    //2~5  Load Poat A Dock
                    lpa.Dock();

                    //6. POD內有光罩, 且放置於Load Port B stage上

                    //7~10  Load Poat B Dock
                    lpb.Dock();
                }
            }
            catch (Exception ex) { throw ex; }
        }
コード例 #3
0
ファイル: UtHalLight.cs プロジェクト: cimmvteam/MvAssistant
        public void TestMethod1()
        {
            using (var halContext = new MacHalContext("UserData/Manifest/Manifest.xml.real"))
            {
                halContext.MvaCfBootup();
                halContext.MvaCfLoad();

                var ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                var cc  = halContext.HalDevices[EnumMacDeviceId.clean_assembly.ToString()] as MacHalCleanCh;
                var lpa = halContext.HalDevices[EnumMacDeviceId.loadportA_assembly.ToString()] as MacHalLoadPort;
                var lpb = halContext.HalDevices[EnumMacDeviceId.loadportB_assembly.ToString()] as MacHalLoadPort;
                var uni = halContext.HalDevices[EnumMacDeviceId.eqp_assembly.ToString()] as MacHalEqp;
                var os  = halContext.HalDevices[EnumMacDeviceId.openstage_assembly.ToString()] as MacHalOpenStage;
                var bt  = halContext.HalDevices[EnumMacDeviceId.boxtransfer_assembly.ToString()] as MacHalBoxTransfer;
                uni.HalConnect();
                ic.HalConnect();
                lpa.HalConnect();
                lpb.HalConnect();
                cc.HalConnect();
                os.HalConnect();
                bt.HalConnect();

                lpa.LightForLoadPortASetValue(200);     //bar 0~255
                lpb.LightForLoadPortBSetValue(200);     //bar 0~255
                lpa.LightForBarcodeReaderSetValue(200); //bar 0~255
                cc.LightForInspSetValue(200);           //bar 0~999
                os.LightForFrontBarDfsSetValue(200);    //bar 0~255
                os.LightForSideBarDfsSetValue(200);     //bar 0~255
                os.LightForTopBarDfsSetValue(200);      //bar 0~255
                bt.LightForGripperSetValue(200);        //bar 0~255

                ic.LightForBackLineSetValue(200);       //bar 0~255(小線光-後)
                ic.LightForLeftLineSetValue(200);       //bar 0~255(小線光-左)
                ic.LightForTopCrlDfsSetValue(200);      //crl 0~255(小環光)
                ic.LightForTopCrlInspSetValue(200);     //crl 0~255(大環光)
                ic.LightForLeftBarSetValue(200);        //spot 0~999(大線光-左)
                ic.LightForRightBarSetValue(200);       //spot 0~999(大線光-右)



                lpa.LightForLoadPortASetValue(0);
                lpb.LightForLoadPortBSetValue(0);
                lpa.LightForBarcodeReaderSetValue(0);
                cc.LightForInspSetValue(0);
                os.LightForFrontBarDfsSetValue(0);
                os.LightForSideBarDfsSetValue(0);
                os.LightForTopBarDfsSetValue(0);
                bt.LightForGripperSetValue(0);

                ic.LightForBackLineSetValue(0);
                ic.LightForLeftLineSetValue(0);
                ic.LightForTopCrlDfsSetValue(0);
                ic.LightForTopCrlInspSetValue(0);
                ic.LightForLeftBarSetValue(0);
                ic.LightForRightBarSetValue(0);
            }
        }
コード例 #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 ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    ic.HalConnect();

                    ic.Initial();

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

                    //2. 將光罩分以4 x 4, 16宮格方式, 移動Stage X &Y方向, 讓編號4 - CCD可以拍攝到每個宮格的影像

                    //3. 每個宮格內, 執行以下程序: 開啟線光源->拍照(FOV正確, 可看到particle)->關閉線光源
                    ic.LightForLeftBarSetValue(999);  //bar 0~999
                    ic.LightForRightBarSetValue(999); //bar 0~999
                    for (int i = 158; i <= 296; i += 23)
                    {
                        for (int j = 123; j <= 261; j += 23)
                        {
                            ic.XYPosition(i, j);
                            ic.Camera_TopInsp_CapToSave("D:/Image/IC/TopInsp", "jpg");
                            Thread.Sleep(500);
                        }
                    }
                    ic.LightForLeftBarSetValue(0);
                    ic.LightForRightBarSetValue(0);

                    //4. 每個宮格內, 執行以下程序: 開啟環形光源->拍照(FOV正確, 可看到光罩pattern)->關閉環形光源
                    ic.LightForTopCrlInspSetValue(255);
                    for (int i = 158; i <= 296; i += 23)
                    {
                        for (int j = 123; j <= 261; j += 23)
                        {
                            ic.XYPosition(i, j);
                            ic.Camera_TopInsp_CapToSave("D:/Image/IC/TopInsp", "jpg");
                            Thread.Sleep(500);
                        }
                    }
                    ic.LightForTopCrlInspSetValue(0);
                }
            }
            catch (Exception ex) { throw ex; }
        }
コード例 #5
0
        public void TestReadParameter()
        {
            using (var halContext = new MacHalContext("UserData/Manifest/Manifest.xml.real"))
            {
                halContext.MvaCfBootup();
                halContext.MvaCfLoad();

                var os = halContext.HalDevices[EnumMacDeviceId.openstage_assembly.ToString()] as MacHalOpenStage;

                os.ReadBoxTypeVar();
                os.ReadSpeedVar();
                os.ReadParticleCntLimit();
            }
        }
コード例 #6
0
ファイル: UtHalCamera.cs プロジェクト: cimmvteam/MvAssistant
        public void TestMethod1()
        {
            using (var halContext = new MacHalContext("UserData/Manifest/Manifest.xml.real"))
            {
                halContext.MvaCfBootup();
                halContext.MvaCfLoad();

                var uni = halContext.HalDevices[EnumMacDeviceId.eqp_assembly.ToString()] as MacHalEqp;
                var ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                var cc  = halContext.HalDevices[EnumMacDeviceId.clean_assembly.ToString()] as MacHalCleanCh;
                var lpa = halContext.HalDevices[EnumMacDeviceId.loadportA_assembly.ToString()] as MacHalLoadPort;
                var lpb = halContext.HalDevices[EnumMacDeviceId.loadportB_assembly.ToString()] as MacHalLoadPort;
                var os  = halContext.HalDevices[EnumMacDeviceId.openstage_assembly.ToString()] as MacHalOpenStage;
                var bt  = halContext.HalDevices[EnumMacDeviceId.boxtransfer_assembly.ToString()] as MacHalBoxTransfer;

                uni.HalConnect();
                ic.HalConnect();
                cc.HalConnect();
                lpa.HalConnect();
                lpb.HalConnect();
                os.HalConnect();
                bt.HalConnect();

                try
                {
                    for (int i = 0; i < 2000; i++)
                    {
                        //ic.Camera_SideDfs_CapToSave("D:/Image/IC/SigeDfs", "jpg");
                        //ic.Camera_TopDfs_CapToSave("D:/Image/IC/TopDfs", "jpg");
                        //ic.Camera_SideInsp_CapToSave("D:/Image/IC/SideInsp", "jpg");
                        ic.Camera_TopInsp_CapToSave("D:/Image/IC/TopInsp", "jpg");//需要有介面卡的主機才能執行此動作
                        //cc.Camera_Insp_CapToSave("D:/Image/CC/Insp", "jpg");
                        //lpa.Camera_LoadPortA_CapToSave("D:/Image/LP/LPA/Insp", "jpg");
                        //lpa.Camera_Barcode_CapToSave("D:/Image/LP/LPA/Barcode", "jpg");
                        //lpb.Camera_LoadPortB_CapToSave("D:/Image/LP/LPB/Insp", "jpg");
                        //os.Camera_Top_CapToSave("D:/Image/OS/Top", "jpg");
                        //os.Camera_Side_CapToSave("D:/Image/OS/Side", "jpg");
                        //os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                        //os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                        //bt.Camera_CapToSave("D:/Image/BT/Gripper", "jpg");
                        Thread.Sleep(100);
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }
コード例 #7
0
        public void TestReadParameter()
        {
            using (var halContext = new MacHalContext("UserData/Manifest/Manifest.xml.real"))
            {
                halContext.MvaCfBootup();
                halContext.MvaCfLoad();

                var ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                var uni = halContext.HalDevices[EnumMacDeviceId.eqp_assembly.ToString()] as MacHalEqp;
                uni.HalConnect();
                ic.HalConnect();

                ic.ReadSpeedVar();
                ic.ReadRobotPosLeftRightLimit();
                ic.ReadRobotPosUpDownLimit();
                ic.ReadParticleCntLimit();
                ic.ReadChamberPressureDiffLimit();
            }
        }
コード例 #8
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; }
        }
コード例 #9
0
ファイル: Ut007_CC.cs プロジェクト: cimmvteam/MvAssistant
        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;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    cc.HalConnect();

                    //1. 氣壓20psi,  噴3秒
                    cc.SetGasValvePressurVar(20);
                    cc.SetGasValveTime(30);

                    //2. 氣壓20psi,  噴5秒
                    cc.SetGasValvePressurVar(20);
                    cc.SetGasValveTime(50);

                    //3. 氣壓20psi,  噴10秒
                    cc.SetGasValvePressurVar(20);
                    cc.SetGasValveTime(100);

                    //4. 氣壓50psi,  噴3秒
                    cc.SetGasValvePressurVar(50);
                    cc.SetGasValveTime(30);

                    //5. 氣壓50psi,  噴5秒
                    cc.SetGasValvePressurVar(50);
                    cc.SetGasValveTime(50);

                    //6. 氣壓50psi,  噴10秒
                    cc.SetGasValvePressurVar(50);
                    cc.SetGasValveTime(100);
                }
            }
            catch (Exception ex) { throw ex; }
        }
コード例 #10
0
ファイル: UtHalCleanCh.cs プロジェクト: cimmvteam/MvAssistant
        public void TestReadComponentValue()
        {
            using (var halContext = new MacHalContext(ManifestPath))
            {
                halContext.MvaCfBootup();
                halContext.MvaCfLoad();

                var cc  = halContext.HalDevices[EnumMacDeviceId.clean_assembly.ToString()] as MacHalCleanCh;
                var uni = halContext.HalDevices[EnumMacDeviceId.eqp_assembly.ToString()] as MacHalEqp;
                uni.HalConnect();
                cc.HalConnect();

                cc.ReadParticleCount();
                cc.ReadMaskLevel();
                cc.ReadRobotPosLeftRight();
                cc.ReadRobotPosUpDown();
                cc.ReadChamberPressureDiff();
                cc.ReadGasValvePressure();
                cc.ReadManometerPressure();
                cc.ReadLightCurtain();
            }
        }
コード例 #11
0
        public void TestReadComponentValue()
        {
            using (var halContext = new MacHalContext("UserData/Manifest/Manifest.xml.real"))
            {
                halContext.MvaCfBootup();
                halContext.MvaCfLoad();

                var ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                var uni = halContext.HalDevices[EnumMacDeviceId.eqp_assembly.ToString()] as MacHalEqp;
                uni.HalConnect();
                ic.HalConnect();

                ic.SetRobotIntrude(false);
                ic.ReadXYPosition();
                ic.ReadZPosition();
                ic.ReadWPosition();
                ic.ReadRobotPosLeftRight();
                ic.ReadRobotPosUpDown();
                ic.ReadParticleCount();
                ic.ReadChamberPressureDiff();
            }
        }
コード例 #12
0
        public void TestReadComponentValue()
        {
            using (var halContext = new MacHalContext("UserData/Manifest/Manifest.xml.real"))
            {
                halContext.MvaCfBootup();
                halContext.MvaCfLoad();

                var bt  = halContext.HalDevices[EnumMacDeviceId.boxtransfer_assembly.ToString()] as MacHalBoxTransfer;
                var uni = halContext.HalDevices[EnumMacDeviceId.eqp_assembly.ToString()] as MacHalEqp;
                uni.HalConnect();
                bt.HalConnect();

                bt.ReadHandPos();
                bt.ReadBoxDetect();
                bt.ReadHandPosByLSR();
                bt.ReadClampDistance();
                bt.ReadLevelSensor();
                bt.ReadSixAxisSensor();
                bt.ReadClampVacuum();
                bt.ReadBT_FrontLimitSenser();
                bt.ReadBT_RearLimitSenser();
            }
        }
コード例 #13
0
ファイル: Ut010_IC.cs プロジェクト: cimmvteam/MvAssistant
        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 ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    ic.HalConnect();

                    ic.Initial();

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

                    //2. Rotate stage, 讓編號1-CCD可以拍攝到光罩4個側邊的影像
                    ic.XYPosition(30, 90);

                    //3. 在每個側邊, 執行以下程序: 開啟Light Bar光源 -> 拍照(FOV正確) -> 關閉Light Bar光源
                    ic.LightForTopCrlDfsSetValue(10); //crl 0~255
                    ic.LightForLeftLineSetValue(100); //spot 0~255
                    for (int i = 0; i < 360; i += 90)
                    {
                        ic.Camera_SideInsp_CapToSave("D:/Image/IC/SideInsp", "jpg");
                    }
                    ic.LightForTopCrlDfsSetValue(0);
                    ic.LightForLeftLineSetValue(0);

                    ic.XYPosition(0, 158);
                    ic.WPosition(0);
                }
            }
            catch (Exception ex) { throw ex; }
        }
コード例 #14
0
ファイル: Ut013_MT.cs プロジェクト: cimmvteam/MvAssistant
        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;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    mt.HalConnect();

                    //1. Mask Robot (無夾持光罩) 從Home點移動至Load Port A
                    mt.RobotMoving(true);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    mt.ExePathMove(pathFileObj.FromLPHomeToLP1PathFile());
                    mt.ExePathMove(pathFileObj.FromLP1ToLPHomePathFile());
                    mt.RobotMoving(false);
                }
            }
            catch (Exception ex) { throw ex; }
        }
コード例 #15
0
ファイル: Ut016_MT.cs プロジェクト: cimmvteam/MvAssistant
        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; }
        }
コード例 #16
0
ファイル: Ut016_MT.cs プロジェクト: cimmvteam/MvAssistant
        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; }
        }
コード例 #17
0
        public void TestMethod3()//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 os  = halContext.HalDevices[EnumMacDeviceId.openstage_assembly.ToString()] as MacHalOpenStage;
                    var ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    mt.HalConnect();
                    os.HalConnect();
                    ic.HalConnect();

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

                    os.Initial();

                    //1. 光罩放置於Open Stage上的鐵盒內
                    os.SetBoxType(BoxType);
                    os.SortClamp();
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();
                    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. 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);

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

                    //4.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.RobotMoving(false);

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

                    //6. Mask Robot將光罩從Inspection Chamber, 移回Open Stage
                    mt.RobotMoving(true);
                    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);

                    //7.Mask Robot將光罩放置於Open Stage上
                    mt.Unclamp();

                    //8. 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());
                    mt.RobotMoving(false);
                    os.SetRobotIntrude(false, false);

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

                    About  = 0;
                    UpDown = 0;

                    BoxType = 2;
                    //8. 重複1~7, 執行Open Stage上水晶盒的傳送測試
                    //1. 光罩放置於Open Stage上的水晶盒內
                    os.SetBoxType(BoxType);
                    os.SortClamp();
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();
                    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. 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);

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

                    //4.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.RobotMoving(false);

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

                    //6. Mask Robot將光罩從Inspection Chamber, 移回Open Stage
                    mt.RobotMoving(true);
                    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);

                    //7.Mask Robot將光罩放置於Open Stage上
                    mt.Unclamp();

                    //8. 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());
                    mt.RobotMoving(false);
                    os.SetRobotIntrude(false, false);

                    os.Close();
                    os.Unclamp();
                    os.Vacuum(false);
                    os.Lock();
                }
            }
            catch (Exception ex) { throw ex; }
        }
コード例 #18
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 os  = halContext.HalDevices[EnumMacDeviceId.openstage_assembly.ToString()] as MacHalOpenStage;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    mt.HalConnect();
                    os.HalConnect();

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

                    os.Initial();

                    os.SetBoxType(BoxType);
                    os.SortClamp();
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();

                    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");
                    }

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

                    if (BoxType == 1)
                    {
                        mt.ExePathMove(pathFileObj.FromIronBoxToOSPathFile());
                    }
                    else if (BoxType == 2)
                    {
                        mt.ExePathMove(pathFileObj.FromCrystalBoxToOSPathFile());
                    }
                    mt.ExePathMove(pathFileObj.FromOSToLPHomePathFile());
                    os.SetRobotIntrude(null, false);
                    mt.RobotMoving(false);
                }
            }
            catch (Exception ex) { throw ex; }
        }
コード例 #19
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;

                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    mt.HalConnect();
                    ic.HalConnect();

                    ic.Initial();

                    //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移動至Inspection Chamber內 (不放置)
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromLP1ToLPHomePathFile());
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.RobotMoving(false);

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

                    //6. Mask Robot將光罩從Inspection Chamber, 移回Load Port A
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICHomePathFile());
                    ic.SetRobotIntrude(false);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    mt.ExePathMove(pathFileObj.FromLPHomeToLP1PathFile());
                    mt.RobotMoving(false);

                    //7. Mask Robot將光罩放置於Load Port A Pod上
                    mt.Unclamp();

                    //8. Mask Robot (無夾持光罩) 從Load Port A移回Home點
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromLP1ToLPHomePathFile());
                    mt.RobotMoving(false);


                    About  = 0;
                    UpDown = 0;
                    //9 重複1~8, 執行Load Port B->Inspection 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移動至Inspection Chamber內 (不放置)
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromLP2ToLPHomePathFile());
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICFrontSidePathFile());
                    mt.RobotMoving(false);

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

                    //6. Mask Robot將光罩從Inspection Chamber, 移回Load Port B
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromICFrontSideToICHomePathFile());
                    ic.SetRobotIntrude(false);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    mt.ExePathMove(pathFileObj.FromLPHomeToLP2PathFile());
                    mt.RobotMoving(false);

                    //7. Mask Robot將光罩放置於Load Port B Pod上
                    mt.Unclamp();

                    //8. Mask Robot (無夾持光罩) 從Load Port B移回Home點
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromLP2ToLPHomePathFile());
                    mt.RobotMoving(false);
                }
            }
            catch (Exception ex) { throw ex; }
        }
コード例 #20
0
ファイル: Ut008_CC.cs プロジェクト: cimmvteam/MvAssistant
        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; }
        }
コード例 #21
0
        public void DrawerCommandTest()
        {
            try
            {
                using (var halContext = new MacHalContext("GenCfg/Manifest/Manifest.xml.real"))
                {
                    halContext.MvaCfBootup();
                    halContext.MvaCfLoad();
                    // halContext.MvCfInit();
                    //halContext.MvCfLoad();

                    var unv = halContext.HalDevices[EnumMacDeviceId.eqp_assembly.ToString()] as MacHalEqp;
                    unv.HalConnect();
                    var cabinet = halContext.HalDevices[EnumMacDeviceId.cabinet_assembly.ToString()] as MacHalCabinet;
                    cabinet.HalConnect();
                    //  var drawer_01_01 = cabinet.Hals[MacEnumDevice.cabinet_drawer_01_01.ToString()] as MacHalDrawerKjMachine;
                    //    var drawer_01_02 = cabinet.Hals[MacEnumDevice.cabinet_drawer_01_02.ToString()] as MacHalDrawerKjMachine;
                    var DR0101 = halContext.HalDevices[EnumMacDeviceId.cabinet_drawer_01_01.ToString()] as MacHalCabinet; //.Hals[MacEnumDevice.cabinet_drawer_01_01.ToString()] as MacHalDrawerKjMachine;
                    var DR0102 = halContext.HalDevices[EnumMacDeviceId.cabinet_drawer_01_02.ToString()] as MacHalCabinet; //.Hals[MacEnumDevice.cabinet_drawer_01_02.ToString()] as MacHalDrawerKjMachine;
                                                                                                                          //  var drawer_01_01 = halContext.HalDevices[MacEnumDevice.cabinet_drawer_01_01.ToString()] as MacHalCabinet;//.Hals[MacEnumDevice.cabinet_drawer_01_01.ToString()] as MacHalDrawerKjMachine;
                                                                                                                          //  var drawer_01_02 = halContext.HalDevices[MacEnumDevice.cabinet_drawer_01_02.ToString()] as MacHalCabinet;//.Hals[MacEnumDevice.cabinet_drawer_01_02.ToString()] as MacHalDrawerKjMachine;
                    var drawer_01_01 = DR0101.MacHalDrawer;
                    var drawer_01_02 = DR0102.MacHalDrawer;
                    var isConnected  = drawer_01_01.HalConnect();

                    // vs 2013
                    // Debug.WriteLine($"IsConnected={isConnected}");
                    Debug.WriteLine("IsConnected=" + isConnected);
                    drawer_01_02.HalConnect();
                    BindEvents(drawer_01_01);
                    BindEvents(drawer_01_02);

                    /**  CommandSetMotionSpeed    */
                    drawer_01_01.CommandSetMotionSpeed(100);
                    drawer_01_02.CommandSetMotionSpeed(100);

                    /** CommandPositionRead
                     * drawer_01_02.CommandPositionRead();
                     * drawer_01_01.CommandPositionRead();
                     */
                    /** CommandBoxDetection
                     * drawer_01_01.CommandBoxDetection();
                     * drawer_01_02.CommandBoxDetection();
                     */
                    /**CommandBrightLEDAllOn()
                     * drawer_01_01.CommandBrightLEDAllOn();
                     * drawer_01_02.CommandBrightLEDAllOn();
                     */
                    /**CommandBrightLEDAllOff()
                     * drawer_01_01.CommandBrightLEDAllOff();
                     * drawer_01_02.CommandBrightLEDAllOff();
                     */
                    /** CommandBrightLEDGreenOn()
                     * drawer_01_01.CommandBrightLEDGreenOn();
                     * drawer_01_02.CommandBrightLEDGreenOn();
                     */
                    /** CommandBrightLEDRedOn()
                     * drawer_01_01.CommandBrightLEDRedOn();
                     * drawer_01_02.CommandBrightLEDRedOn();
                     */
                    /** CommandINI()
                     * drawer_01_01.CommandINI();
                     * drawer_01_02.CommandINI();
                     */
                    /** CommandSetTimeOut()
                     * drawer_01_01.CommandSetTimeOut(100);
                     * drawer_01_02.CommandSetTimeOut(100);
                     */

                    /** CommandTrayMotionHome()
                     * drawer_01_01.CommandTrayMotionHome();
                     * drawer_01_02.CommandTrayMotionHome();
                     */
                    /** CommandTrayMotionHome()
                     * drawer_01_01.CommandTrayMotionIn();
                     * drawer_01_02.CommandTrayMotionIn();
                     */
                    /** CommandTrayMotionHome()
                     * drawer_01_01.CommandTrayMotionOut();
                     * drawer_01_01.CommandTrayMotionOut();
                     */


                    Repeat();
                }
            }
            catch (Exception ex)
            {
                MvaLog.WarnNs(this, ex);
            }
        }
コード例 #22
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 bt  = halContext.HalDevices[EnumMacDeviceId.boxtransfer_assembly.ToString()] as MacHalBoxTransfer;
                    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();
                    bt.HalConnect();
                    ic.HalConnect();
                    os.HalConnect();

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

                    os.Initial();
                    #region Iron Box
                    //1. 光罩鐵盒(無光罩)放置於Open Stage上方

                    //2. Load Cell可以讀出光罩鐵盒(無光罩)重量, 確認鐵盒有放置好位置
                    var BoxWeight = os.ReadWeightOnStage();
                    if (BoxType == 1)
                    {
                        if ((BoxWeight < 560 || BoxWeight > 590) && (BoxWeight < 895 || BoxWeight > 925))
                        {
                            throw new Exception("Wrong iron box weight, box weight = " + BoxWeight.ToString());
                        }
                    }
                    else if (BoxType == 2)
                    {
                        if ((BoxWeight < 290 || BoxWeight > 320) && (BoxWeight < 625 || BoxWeight > 655))
                        {
                            throw new Exception("Wrong crystal box weight, box weight = " + BoxWeight.ToString());
                        }
                    }

                    //3. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //4. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //5. Open Stage固定光罩鐵盒 by 整定棒
                    os.SetBoxType(BoxType);
                    os.SortClamp();

                    //6. Open Stage固定光罩鐵盒 by 吸盤
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();

                    //7. Front CCD可以拍照取像(FOV正確)
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //8. 透過Box Robot PIN, 開啟光罩鐵盒鈕扣
                    if (BoxType == 1)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.UnlockIronBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }
                    else if (BoxType == 2)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.UnlockCrystalBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }

                    //9. 開盒機構正常開啟光罩鐵盒
                    os.Close();
                    os.Clamp();
                    os.Open();

                    //10. Fiber Sensor確認光罩鐵盒已開啟 & 辨識光罩盒種類
                    if (os.ReadCoverSensor().Item2 == false)
                    {
                        throw new Exception("Box status was not closed");
                    }

                    os.Close();
                    os.Unclamp();
                    os.Lock();
                    os.Vacuum(false);
                    #endregion Iron Box
                    //11. 重複1~10步驟, 再執行光罩鐵盒(有光罩) / 光罩水晶盒(無光罩) / 光罩水晶盒(有光罩)之情境
                    #region Iron Box with Mask
                    //1. 光罩鐵盒(有光罩)放置於Open Stage上方

                    //2. Load Cell可以讀出光罩鐵盒(有光罩)重量, 確認鐵盒有放置好位置
                    if (BoxType == 1)
                    {
                        if ((BoxWeight < 560 || BoxWeight > 590) && (BoxWeight < 895 || BoxWeight > 925))
                        {
                            throw new Exception("Wrong iron box weight, box weight = " + BoxWeight.ToString());
                        }
                    }
                    else if (BoxType == 2)
                    {
                        if ((BoxWeight < 290 || BoxWeight > 320) && (BoxWeight < 625 || BoxWeight > 655))
                        {
                            throw new Exception("Wrong crystal box weight, box weight = " + BoxWeight.ToString());
                        }
                    }

                    //3. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //4. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //5. Open Stage固定光罩鐵盒 by 整定棒
                    os.SetBoxType(BoxType);
                    os.SortClamp();

                    //6. Open Stage固定光罩鐵盒 by 吸盤
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();

                    //7. Front CCD可以拍照取像(FOV正確)
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //8. 透過Box Robot PIN, 開啟光罩鐵盒鈕扣
                    if (BoxType == 1)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.UnlockIronBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }
                    else if (BoxType == 2)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.UnlockCrystalBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }

                    //9. 開盒機構正常開啟光罩鐵盒
                    os.Close();
                    os.Clamp();
                    os.Open();

                    //10. Fiber Sensor確認光罩鐵盒已開啟 & 辨識光罩盒種類
                    if (os.ReadCoverSensor().Item2 == false)
                    {
                        throw new Exception("Box status was not closed");
                    }

                    os.Close();
                    os.Unclamp();
                    os.Lock();
                    os.Vacuum(false);
                    #endregion Iron Box with Mask
                    BoxType = 2;
                    //11. 重複1~10步驟, 再執行光罩水晶盒(無光罩) / 光罩水晶盒(有光罩)之情境
                    #region Crystal Box
                    //1. 光罩水晶盒(無光罩)放置於Open Stage上方

                    //2. Load Cell可以讀出光罩水晶盒(無光罩)重量, 確認水晶盒有放置好位置
                    BoxWeight = os.ReadWeightOnStage();
                    if (BoxType == 1)
                    {
                        if ((BoxWeight < 560 || BoxWeight > 590) && (BoxWeight < 895 || BoxWeight > 925))
                        {
                            throw new Exception("Wrong iron box weight, box weight = " + BoxWeight.ToString());
                        }
                    }
                    else if (BoxType == 2)
                    {
                        if ((BoxWeight < 290 || BoxWeight > 320) && (BoxWeight < 625 || BoxWeight > 655))
                        {
                            throw new Exception("Wrong crystal box weight, box weight = " + BoxWeight.ToString());
                        }
                    }

                    //3. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //4. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //5. Open Stage固定光罩水晶盒 by 整定棒
                    os.SetBoxType(BoxType);
                    os.SortClamp();

                    //6. Open Stage固定光罩水晶盒 by 吸盤
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();

                    //7. Front CCD可以拍照取像(FOV正確)
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //8. 透過Box Robot PIN, 開啟光罩水晶盒鈕扣
                    if (BoxType == 1)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.UnlockIronBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }
                    else if (BoxType == 2)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.UnlockCrystalBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }

                    //9. 開盒機構正常開啟光罩水晶盒
                    os.Close();
                    os.Clamp();
                    os.Open();

                    //10. Fiber Sensor確認光罩水晶盒已開啟 & 辨識光罩盒種類
                    if (os.ReadCoverSensor().Item2 == false)
                    {
                        throw new Exception("Box status was not closed");
                    }

                    os.Close();
                    os.Unclamp();
                    os.Lock();
                    os.Vacuum(false);
                    #endregion Crystal Box
                    //11. 重複1~10步驟, 再執光罩水晶盒(有光罩)之情境
                    #region Crystal Box with Mask
                    //1. 光罩水晶盒(有光罩)放置於Open Stage上方

                    //2. Load Cell可以讀出光罩水晶盒(有光罩)重量, 確認水晶盒有放置好位置
                    if (BoxType == 1)
                    {
                        if ((BoxWeight < 560 || BoxWeight > 590) && (BoxWeight < 895 || BoxWeight > 925))
                        {
                            throw new Exception("Wrong iron box weight, box weight = " + BoxWeight.ToString());
                        }
                    }
                    else if (BoxType == 2)
                    {
                        if ((BoxWeight < 290 || BoxWeight > 320) && (BoxWeight < 625 || BoxWeight > 655))
                        {
                            throw new Exception("Wrong crystal box weight, box weight = " + BoxWeight.ToString());
                        }
                    }

                    //3. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //4. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //5. Open Stage固定光罩水晶盒 by 整定棒
                    os.SetBoxType(BoxType);
                    os.SortClamp();

                    //6. Open Stage固定光罩水晶盒 by 吸盤
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();

                    //7. Front CCD可以拍照取像(FOV正確)
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //8. 透過Box Robot PIN, 開啟光罩水晶盒鈕扣
                    if (BoxType == 1)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.UnlockIronBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }
                    else if (BoxType == 2)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.UnlockCrystalBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }

                    //9. 開盒機構正常開啟光罩水晶盒
                    os.Close();
                    os.Clamp();
                    os.Open();

                    //10. Fiber Sensor確認光罩水晶盒已開啟 & 辨識光罩盒種類
                    if (os.ReadCoverSensor().Item2 == false)
                    {
                        throw new Exception("Box status was not closed");
                    }

                    os.Close();
                    os.Unclamp();
                    os.Lock();
                    os.Vacuum(false);
                    #endregion Crystal Box with Mask
                }
            }
            catch (Exception ex) { throw ex; }
        }
コード例 #23
0
ファイル: Ut022_BT.cs プロジェクト: cimmvteam/MvAssistant
        [DataRow(EnumMacMaskBoxType.IronBox, true, DrawerReplaceBoxPlace.In)] // 鐵盒
        //[DataRow(BoxType.CrystalBox,true)]  // 水晶盒
        public void TestMethod1(EnumMacMaskBoxType boxType, bool autoConnect, DrawerReplaceBoxPlace drawerReplaceBoxPlace)
        {
            var BREAK_POINT = 0;

            using (var halContext = new MacHalContext("UserData/Manifest/Manifest.xml.real"))
            {
                /** Index & array
                 * [0]   [1]  [2]
                 * 1-2,  1-3, 1-4     IP: 31~33
                 * ------------------
                 * [3]   [4]  [5]
                 * 2-2,  2-3, 2-4,    IP: 41~43
                 * ------------------
                 * [6]   [7]  [8]
                 * 3-2,  3-3, 3-4,    IP: 51~53
                 * ----------------
                 * [9]   [10] [11]
                 * 4-2,  4-3, 4-4,    IP: 61~63
                 * ------------------
                 * [12]  [13] [14]
                 * 5-2,  5-3, 5-4,    IP: 71~73
                 * ------------------
                 * [15]  [16] [17]
                 * 6-2,  6-3, 6-4,    IP: 81~83
                 *--------------------
                 * [18]  [19]
                 * 7-2,  7-3,         IP: 91~92
                 */

                halContext.MvaCfBootup();
                halContext.MvaCfLoad();

                try
                {
                    var    uni            = halContext.HalDevices[EnumMacDeviceId.eqp_assembly.ToString()] as MacHalEqp;
                    var    bt             = halContext.HalDevices[EnumMacDeviceId.boxtransfer_assembly.ToString()] as MacHalBoxTransfer;
                    var    os             = halContext.HalDevices[EnumMacDeviceId.openstage_assembly.ToString()] as MacHalOpenStage;
                    string btMovePathFile = default(string);

                    uni.HalConnect();
                    bt.HalConnect();
                    os.HalConnect();


                    halContext.DrawersConnect();
                    //bt.Reset();
                    bt.Initial();
                    //bt.TurnToCB1Home();
                    int start = 8;
                    int end   = 10;

                    for (var i = start; i < end; i++)
                    {
                        try
                        {
                            var           drawerLocation = DrawerLocations[i];
                            var           drawer         = halContext.GetDrawer(DrawerKeys[i]);
                            IMacHalDrawer previousDrawer = null;
                            var           drawerHome     = drawerLocation.GetCabinetHomeCode().Item2;
                            /** 00 預先動作, 如有上一輪的 Drawer, 將上一輪的 Drawer 推回到 Out , 取出 Box, 將Box放到現在的 Drawer Tray中, 並將 Tray 放回 Home */
                            // 0.1 如有上一輪的 Drawer, 將其 Tray 移到 可抽換 box 的位置
                            if (i > start)
                            {
                                previousDrawer = halContext.GetDrawer(DrawerKeys[i - 1]);
                                previousDrawer.MoveTrayToHome();
                                if (drawerReplaceBoxPlace == DrawerReplaceBoxPlace.In)
                                {
                                    previousDrawer.MoveTrayToIn();
                                }
                                else
                                {
                                    previousDrawer.MoveTrayToOut();
                                }
                            }
                            // 0.2 將目前的  Drawer Tray Initial
                            drawer.Initial();
                            // 0.3 將 目前的  Drawer Tray 移回 可以置換 Drawer 的地方
                            if (drawerReplaceBoxPlace == DrawerReplaceBoxPlace.In)
                            {
                                drawer.MoveTrayToIn();
                            }
                            else
                            {
                                drawer.MoveTrayToOut();
                            }


                            /**1. 光罩盒置於 Drawer內*/
                            BREAK_POINT++; //[[[[[[[[[[[[[[[[[[一定要暫停]]]]]]]]]]]]]]]]]]]]]]]]]]   確認有 Box後往下執行
                            // 1.1 如有上一個  Drawer, 將上一個 Drawer 移到 Home
                            if (previousDrawer != null)
                            { //
                                previousDrawer.MoveTrayToHome();;
                            }
                            // 1.2 Drawer Tray 往機台內部移動到可以取得光罩的位置
                            drawer.MoveTrayToHome();
                            drawer.MoveTrayToIn();

                            /** 02 Box Robot從Home點至Drawer entry處*/
                            if (drawerHome == BoxrobotTransferLocation.Cabinet_01_Home)
                            {                                                                                        // Drawer 01-01 ~ Drawer 03-05
                                bt.TurnToCB1Home();
                                btMovePathFile = pathFileObj.FromCabinet01HomeToDrawer_GET_PathFile(drawerLocation); // Box Transfer 要去 Drawer 夾盒子, 所以用 GET
                            }
                            else //if(drawerHome == BoxrobotTransferLocation.Cabinet_02_Home)
                            {   // // Drawer 04-01 ~ Drawer 07-05
                                //Cabinet 2 Drawer 的 Path
                                bt.TurnToCB1Home();
                                bt.TurnToCB2Home();
                                btMovePathFile = pathFileObj.FromCabinet02HomeToDrawer_GET_PathFile(drawerLocation); // Box Transfer 要去 Drawer 夾盒子, 所以用 GET
                            }
                            bt.Move(btMovePathFile);

                            /** 03 (編號13-CCD): 開啟光源 -> 拍照(FOV正確) -> 關閉光源*/

                            try
                            {
                                var lightValue = bt.GetCameraLightValue(boxType);
                                bt.LightForGripperSetValue(lightValue);
                                bt.Camera_CapToSave("D:/Image/BT/Gripper", "jpg");
                                //bt.LightForGripper(0);
                            }
                            catch (Exception ex)
                            {
                                MvaLog.WarnNs(this, ex);
                            }
                            finally
                            {
                                bt.LightForGripperSetValue(0);
                            }
                            //    bt.Clamp((uint)boxType);
                            //var lightValue = bt.GetCameraLightValue(boxType);
                            //var resultTemp=bt.CameraShot("D:/Image/BT/Gripper", "jpg",lightValue);


                            /** 04 Box Robot從Drawer Entry處移至Drawer內進行光罩鐵盒夾取*/
                            var resultTemp = bt.Clamp((uint)boxType);

                            /** 05 光罩鐵盒夾取前確認Box Robot是水平狀態 (by 水平儀)*/
                            var Level = bt.ReadLevelSensor();

                            /** 06 Box Robot將光罩鐵盒從Drawer移動至Open Stage上方*/
                            // 6.1 回到 Cabinet 1 Home
                            if (drawerHome == BoxrobotTransferLocation.Cabinet_01_Home)
                            {
                                btMovePathFile = pathFileObj.FromDrawerToCabinet01Home_GET_PathFile(drawerLocation); // Box Transfer 夾到盒子後,由 Drawer 回到 Home, 用GET
                                bt.Move(btMovePathFile);
                            }
                            else // if(drawerHome == BoxrobotTransferLocation.Cabinet_02_Home)
                            {   // Drawer 04_01~07~05 回到  Cabinet 1 Home
                                btMovePathFile = pathFileObj.FromDrawerToCabinet02Home_GET_PathFile(drawerLocation);// Box Transfer 夾到盒子後,由 Drawer 回到 Home, 用GET
                                bt.Move(btMovePathFile);
                                bt.TurnToCB1Home();
                            }

                            // 6.2 boxrobot 移到 OpenStage
                            os.SetRobotIntrude(true, null);
                            btMovePathFile = pathFileObj.FromCabinet01HomeToOpenStage_PUT_PathFile(); // boxrobot 目前有盒子, 要到 Open Stage, 用PUT
                            bt.Move(btMovePathFile);

                            /** 07 光罩鐵盒放置前確認Box Robot是水平狀態 (by 水平儀)*/
                            Level = bt.ReadLevelSensor();

                            /** 08 Box Robot將光罩鐵盒放置於Open Stage上*/
                            bt.Unclamp();

                            /** 09 Box Robot退出Open Stage, 並回到Box Robot Home點*/
                            btMovePathFile = pathFileObj.FromOpenStageToCabinet01Home_PUT_PathFile();
                            bt.Move(btMovePathFile);
                            os.SetRobotIntrude(false, null);

                            /** 10 (編號9-CCD): 開啟光源 -> 拍照(FOV正確) -> 關閉光源*/

                            /**
                             * os.LightForTopBarDfsSetValue(200);
                             * os.Camera_Top_CapToSave("D:/Image/OS/Top", "jpg");
                             * os.LightForTopBarDfsSetValue(0);
                             */
                            try
                            {
                                os.LightForFrontBarDfsSetValue(85); //bar 0~255
                                os.LightForSideBarDfsSetValue(140); //bar 0~255
                                os.LightForTopBarDfsSetValue(20);   //bar 0~255
                                os.Camera_Top_CapToSave("D:/Image/OS/Top", "jpg");
                                Debug.WriteLine("Open Stage Camera Shot(Top) OK");
                            }
                            catch (Exception ex)
                            {
                                Debug.WriteLine("Open Stage Camera Shot(Top) Error=" + ex.Message);
                            }
                            finally
                            {
                                os.LightForFrontBarDfsSetValue(0);
                                os.LightForSideBarDfsSetValue(0);
                                os.LightForTopBarDfsSetValue(0);
                            }



                            /** 11 (編號12-CCD): 開啟光源 -> 拍照(FOV正確) -> 關閉光源*/

                            /**
                             * os.LightForSideBarDfsSetValue(200);
                             * os.Camera_Side_CapToSave("D:/Image/OS/Side", "jpg");
                             * os.LightForSideBarDfsSetValue(0);
                             */
                            try
                            {
                                os.LightForFrontBarDfsSetValue(85); //bar 0~255
                                os.LightForSideBarDfsSetValue(140); //bar 0~255
                                os.LightForTopBarDfsSetValue(20);   //bar 0~255
                                os.Camera_Side_CapToSave("D:/Image/OS/Side", "jpg");

                                Debug.WriteLine("Open Stage Camera Shot OK");
                            }
                            catch (Exception ex)
                            {
                                Debug.WriteLine("Open Stage Camera Shot(Side) Error=" + ex.Message);
                            }
                            finally
                            {
                                os.LightForFrontBarDfsSetValue(0);
                                os.LightForSideBarDfsSetValue(0);
                                os.LightForTopBarDfsSetValue(0);
                            }

                            /** 12 Box Robot(無夾持光罩鐵盒)從Home點移動進入Open Stage上方*/
                            os.SetRobotIntrude(true, null);
                            btMovePathFile = pathFileObj.FromCabinet01HomeToOpenStage_GET_PathFile();
                            bt.Move(btMovePathFile);

                            /** 13 光罩鐵盒夾取前確認Box Robot是水平狀態 (by 水平儀)*/
                            Level = bt.ReadLevelSensor();

                            /** 14 Box Robot從Open Stage上方夾取光罩鐵盒*/
                            bt.Clamp((uint)boxType);

                            /** 15 Box Robot將光罩鐵盒移動至Drawer處*/
                            // 15.1 Boxrobot 移到 Cabitnet 1 Home
                            btMovePathFile = pathFileObj.FromOpenStageToCabinet01Home_GET_PathFile(); // boxrobot 目前有盒子,要回到 Cabinet 1 Home, 用 GET
                            bt.Move(btMovePathFile);
                            os.SetRobotIntrude(false, null);
                            // 15.2
                            if (drawerHome == BoxrobotTransferLocation.Cabinet_01_Home)
                            {                                                                                        // drawer 01-01 ~ drawer 03-05
                                btMovePathFile = pathFileObj.FromCabinet01HomeToDrawer_PUT_PathFile(drawerLocation); // boxrobot 目前有盒子,要到 Drawer, 所以用 PUT
                                bt.Move(btMovePathFile);
                            }
                            else //if(drawerHome == BoxrobotTransferLocation.Cabinet_02_Home)
                            {
                                // drawer 04-01 ~ drawer 07-05
                                bt.TurnToCB2Home();
                                btMovePathFile = pathFileObj.FromCabinet02HomeToDrawer_PUT_PathFile(drawerLocation); // boxrobot 目前有盒子,要到 Drawer, 所以用 PUT
                                bt.Move(btMovePathFile);
                            }


                            /** 16 (編號13-CCD): 開啟光源 -> 拍照(FOV正確) -> 關閉光源*/
                            try
                            {
                                var lightValue = bt.GetCameraLightValue(boxType);
                                bt.LightForGripperSetValue(lightValue);
                                bt.Camera_CapToSave("D:/Image/BT/Gripper", "jpg");
                            }
                            catch (Exception ex)
                            {
                                MvaLog.WarnNs(this, ex);
                            }
                            finally
                            {
                                bt.LightForGripperSetValue(0);
                            }

                            //lightValue = bt.GetCameraLightValue(boxType);
                            //resultTemp= bt.CameraShot("D:/Image/BT/Gripper", "jpg", lightValue);

                            /** 17 Box Robot將光罩鐵盒移動至Drawer內*/
                            bt.Unclamp();

                            /** 18 Box Robot (無夾持光罩鐵盒) 從Drawer移回Home點*/
                            // 18.1 Boxrobot 移回 Home 點
                            if (drawerHome == BoxrobotTransferLocation.Cabinet_01_Home)
                            {
                                btMovePathFile = pathFileObj.FromDrawerToCabinet01Home_PUT_PathFile(drawerLocation); //
                            }
                            else //if(drawerHome == BoxrobotTransferLocation.Cabinet_02_Home)
                            {
                                btMovePathFile = pathFileObj.FromDrawerToCabinet02Home_PUT_PathFile(drawerLocation); // T
                            }
                            bt.Move(btMovePathFile);

                            // 18.2 Drawer 04-01 ~ Drawer 07-05 時 Boxrobot 轉回 Cabitnet 1 Home
                            if (drawerHome == BoxrobotTransferLocation.Cabinet_02_Home)
                            {
                                bt.TurnToCB1Home();
                            }


                            // drawer.CommandINI();
                            /** 19 重複1~18步驟, 完成20個Drawer的光罩鐵盒測試*/
                            /** 20 重複1~19步驟, 完成20個Drawer的光罩水晶盒測試*/

                            BREAK_POINT++; // [一定要暫停] 這個 drawer 做好了, 準備下一個
                        }
                        catch (Exception ex)                       { MvaLog.WarnNs(this, ex); }
                    }
                }
                catch (Exception ex)                { MvaLog.WarnNs(this, ex); }
            }
        }
コード例 #24
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; }
        }
コード例 #25
0
ファイル: Ut013_MT.cs プロジェクト: cimmvteam/MvAssistant
        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; }
        }
コード例 #26
0
ファイル: Ut021_MT.cs プロジェクト: cimmvteam/MvAssistant
        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; }
        }
コード例 #27
0
 /// <summary>初始化及載入 MacHalContext</summary>
 /// <param name="instance"></param>
 public static void InitialAndLoad(this MacHalContext instance)
 {
     instance.MvaCfBootup();
     instance.MvaCfLoad();
 }
コード例 #28
0
ファイル: Ut024_OS.cs プロジェクト: cimmvteam/MvAssistant
        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 bt  = halContext.HalDevices[EnumMacDeviceId.boxtransfer_assembly.ToString()] as MacHalBoxTransfer;
                    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();
                    bt.HalConnect();
                    ic.HalConnect();
                    os.HalConnect();

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

                    os.Initial();
                    #region Iron Box
                    //1.光罩鐵盒(無光罩)放置於Open Stage上方且上蓋已是開啟狀態
                    os.SetBoxType(BoxType);
                    os.SortClamp();
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();
                    if (os.ReadCoverSensor().Item2 == false)
                    {
                        throw new Exception("Box status was not closed");
                    }
                    os.Close();
                    os.Clamp();
                    os.Open();

                    //2. Fiber Sensor確認光罩鐵盒上蓋已開啟 & 辨識光罩盒種類
                    if (os.ReadCoverSensor().Item1 == false)
                    {
                        throw new Exception("Box status was not opened");
                    }

                    //3. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //4. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //5. 開關盒機構可正常闔上光罩鐵盒上蓋
                    os.Close();
                    os.Unclamp();
                    os.Lock();

                    //6. 透過Box Robot PIN, 關閉光罩鐵盒鈕扣
                    if (BoxType == 1)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.LockIronBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }
                    else if (BoxType == 2)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.LockCrystalBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }

                    //7. Front CCD可以拍照取像(FOV正確)
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //8. Open Stage吸盤鬆開光罩鐵盒
                    os.Vacuum(false);

                    //9. Open Stage整定棒鬆開光罩鐵盒
                    os.SortUnclamp();

                    //10. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //11. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    #endregion Iron Box
                    //12. 重複1~11步驟, 再執行光罩鐵盒(有光罩) / 光罩水晶盒(無光罩) / 光罩水晶盒(有光罩)之情境
                    #region Iron Box with Mask
                    //1.光罩鐵盒(有光罩)放置於Open Stage上方且上蓋已是開啟狀態
                    os.SetBoxType(BoxType);
                    os.SortClamp();
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();
                    if (os.ReadCoverSensor().Item2 == false)
                    {
                        throw new Exception("Box status was not closed");
                    }
                    os.Close();
                    os.Clamp();
                    os.Open();

                    //2. Fiber Sensor確認光罩鐵盒上蓋已開啟 & 辨識光罩盒種類
                    if (os.ReadCoverSensor().Item1 == false)
                    {
                        throw new Exception("Box status was not opened");
                    }

                    //3. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //4. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //5. 開關盒機構可正常闔上光罩鐵盒上蓋
                    os.Close();
                    os.Unclamp();
                    os.Lock();

                    //6. 透過Box Robot PIN, 關閉光罩鐵盒鈕扣
                    if (BoxType == 1)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.LockIronBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }
                    else if (BoxType == 2)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.LockCrystalBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }

                    //7. Front CCD可以拍照取像(FOV正確)
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //8. Open Stage吸盤鬆開光罩鐵盒
                    os.Vacuum(false);

                    //9. Open Stage整定棒鬆開光罩鐵盒
                    os.SortUnclamp();

                    //10. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //11. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    #endregion Iron Box with Mask
                    BoxType = 2;
                    //12. 重複1~11步驟, 再執行光罩水晶盒(無光罩) / 光罩水晶盒(有光罩)之情境
                    #region Crystal Box
                    //1.光罩水晶盒(無光罩)放置於Open Stage上方且上蓋已是開啟狀態
                    os.SetBoxType(BoxType);
                    os.SortClamp();
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();
                    if (os.ReadCoverSensor().Item2 == false)
                    {
                        throw new Exception("Box status was not closed");
                    }
                    os.Close();
                    os.Clamp();
                    os.Open();

                    //2. Fiber Sensor確認光罩水晶盒上蓋已開啟 & 辨識光罩盒種類
                    if (os.ReadCoverSensor().Item1 == false)
                    {
                        throw new Exception("Box status was not opened");
                    }

                    //3. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //4. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //5. 開關盒機構可正常闔上光罩水晶盒上蓋
                    os.Close();
                    os.Unclamp();
                    os.Lock();

                    //6. 透過Box Robot PIN, 關閉光罩水晶盒鈕扣
                    if (BoxType == 1)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.LockIronBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }
                    else if (BoxType == 2)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.LockCrystalBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }

                    //7. Front CCD可以拍照取像(FOV正確)
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //8. Open Stage吸盤鬆開光罩水晶盒
                    os.Vacuum(false);

                    //9. Open Stage整定棒鬆開光罩水晶盒
                    os.SortUnclamp();

                    //10. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //11. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    #endregion Crystal Box
                    //12. 重複1~11步驟, 再執行光罩水晶盒(有光罩)之情境
                    #region Crystal Box with Mask
                    //1.光罩水晶盒(有光罩)放置於Open Stage上方且上蓋已是開啟狀態
                    os.SetBoxType(BoxType);
                    os.SortClamp();
                    os.Vacuum(true);
                    os.SortUnclamp();
                    os.Lock();
                    if (os.ReadCoverSensor().Item2 == false)
                    {
                        throw new Exception("Box status was not closed");
                    }
                    os.Close();
                    os.Clamp();
                    os.Open();

                    //2. Fiber Sensor確認光罩水晶盒上蓋已開啟 & 辨識光罩盒種類
                    if (os.ReadCoverSensor().Item1 == false)
                    {
                        throw new Exception("Box status was not opened");
                    }

                    //3. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //4. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //5. 開關盒機構可正常闔上光罩水晶盒上蓋
                    os.Close();
                    os.Unclamp();
                    os.Lock();

                    //6. 透過Box Robot PIN, 關閉光罩水晶盒鈕扣
                    if (BoxType == 1)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.LockIronBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }
                    else if (BoxType == 2)
                    {
                        bt.RobotMoving(true);
                        os.SetRobotIntrude(true, null);
                        bt.ExePathMove(pathFileObj.LockCrystalBoxPathFile());
                        os.SetRobotIntrude(false, null);
                        bt.RobotMoving(false);
                    }

                    //7. Front CCD可以拍照取像(FOV正確)
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //8. Open Stage吸盤鬆開光罩水晶盒
                    os.Vacuum(false);

                    //9. Open Stage整定棒鬆開光罩水晶盒
                    os.SortUnclamp();

                    //10. (編號10 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Left_CapToSave("D:/Image/OS/Left", "jpg");
                    os.LightForFrontBarDfsSetValue(0);

                    //11. (編號11 - CCD): 開啟光源->拍照(FOV正確)->關閉光源
                    os.LightForFrontBarDfsSetValue(6);
                    os.Camera_Right_CapToSave("D:/Image/OS/Right", "jpg");
                    os.LightForFrontBarDfsSetValue(0);
                    #endregion Crystal Box with Mask
                }
            }
            catch (Exception ex) { throw ex; }
        }
コード例 #29
0
ファイル: Ut019_MT.cs プロジェクト: cimmvteam/MvAssistant
        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 lpb = halContext.HalDevices[EnumMacDeviceId.loadportB_assembly.ToString()] as MacHalLoadPort;
                    var lpa = halContext.HalDevices[EnumMacDeviceId.loadportA_assembly.ToString()] as MacHalLoadPort;
                    var ic  = halContext.HalDevices[EnumMacDeviceId.inspectionch_assembly.ToString()] as MacHalInspectionCh;
                    unv.HalConnect();//需要先將MacHalUniversal建立連線,各Assembly的Hal建立連線時,才能讓PLC的連線成功
                    mt.HalConnect();
                    lpb.HalConnect();
                    lpa.HalConnect();
                    ic.HalConnect();

                    //1. 光罩放置於Load Port B POD內

                    //2~5  Load Poat B Dock
                    lpb.Dock();

                    //6. (編號7-CCD): 開啟光源 -> 拍照(FOV正確) -> 關閉光源
                    lpb.LightForLoadPortBSetValue(255);
                    lpb.Camera_LoadPortB_CapToSave("D:/Image/LP/LPB/Insp", "jpg");
                    lpb.LightForLoadPortBSetValue(0);

                    //7.Mask Robot從Home點移動至Load Port B
                    mt.RobotMoving(true);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    mt.ExePathMove(pathFileObj.FromLPHomeToLP2PathFile());
                    mt.RobotMoving(false);

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

                    //9. Mask Robot在Load Port B 進行光罩夾取
                    mt.Clamp(1);

                    //10. Mask Robot將光罩從Load Port B移動至Recognizer Chamber處
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromLP2ToLPHomePathFile());
                    mt.ExePathMove(pathFileObj.FromLPHomeToBarcodeReaderPathFile());
                    mt.RobotMoving(false);

                    //11. (編號8 - Barcode CCD)拍攝mask barcode, 並能成功辨識ID
                    lpa.LightForBarcodeReaderSetValue(2);
                    lpa.Camera_Barcode_CapToSave("D:/Image/LP/LPA/Barcode", "jpg");
                    lpa.LightForBarcodeReaderSetValue(0);

                    //12. Mask Robot將光罩從Recognizer移動至Inspection Chamber Entry處
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromBarcodeReaderToLPHomePathFile());
                    mt.ChangeDirection(pathFileObj.InspChHomePathFile());
                    ic.SetRobotIntrude(true);
                    mt.ExePathMove(pathFileObj.FromICHomeToICBackSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICBackSideToICStagePathFile());
                    mt.RobotMoving(false);

                    //13. Mask Robot將光罩從Inspection Chamber Entry處, 移回Load Port B
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromICStageToICBackSidePathFile());
                    mt.ExePathMove(pathFileObj.FromICBackSideToICHomePathFile());
                    ic.SetRobotIntrude(false);
                    mt.ChangeDirection(pathFileObj.LoadPortHomePathFile());
                    mt.ExePathMove(pathFileObj.FromLPHomeToLP2PathFile());
                    mt.RobotMoving(false);

                    //14. Mask Robot將光罩放置於Load Port B POD內
                    mt.Unclamp();

                    //15. Mask Robot (無夾持光罩) 從Load Port B移回Home點
                    mt.RobotMoving(true);
                    mt.ExePathMove(pathFileObj.FromLP2ToLPHomePathFile());
                    mt.RobotMoving(false);

                    //16. (編號7-CCD): 開啟光源 -> 拍照(FOV正確) -> 關閉光源
                    lpb.LightForLoadPortBSetValue(255);
                    lpb.Camera_LoadPortB_CapToSave("D:/Image/LP/LPB/Insp", "jpg");
                    lpb.LightForLoadPortBSetValue(0);

                    //17~20  Load Port B Undock
                    lpb.Undock();
                }
            }
            catch (Exception ex) { throw ex; }
        }
コード例 #30
0
ファイル: Ut020_MT.cs プロジェクト: cimmvteam/MvAssistant
        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; }
        }