예제 #1
0
 public static void CldVacuum4Off()                         //破真空4
 {
     GClsMontion.WriteIOCard7432OutputBit(0, 3, 0);         //吸真空4
     GClsMontion.WriteIOCard7432OutputBit(0, 15, 1);        //破真空4
     GClsMontion.WaitIOCard7432InputBit(0, 3, 0, 3000, 52); //吸真空4感应
     GClsMontion.WriteIOCard7432OutputBit(0, 15, 0);        //破真空4
 }
예제 #2
0
 public void StreamLimeReset()//流线复位
 {
     Main.frmMain.ListBoxDisplay("复位--流线破真空");
     CAMiClsCylinder.StreamLine1VacuumOff(); //破真空
     CAMiClsCylinder.StreamLine2VacuumOff(); //破真空
     Main.frmMain.PauseCheck();
     Main.frmMain.ListBoxDisplay("复位--流线夹紧气缸松开");
     CAMiClsCylinder.StreamLine1Clamp2Retract(); //夹紧松开
     CAMiClsCylinder.StreamLine1Clamp1Retract();
     CAMiClsCylinder.StreamLine2Clamp2Retract(); //夹紧松开
     CAMiClsCylinder.StreamLine2Clamp1Retract();
     Main.frmMain.PauseCheck();
     Main.frmMain.ListBoxDisplay("复位--顶升气缸下降");
     CAMiClsCylinder.StreamLine1LiftingDown(); //顶升下降
     CAMiClsCylinder.StreamLine2LiftingDown(); //顶升下降
     Main.frmMain.PauseCheck();
     Main.frmMain.ListBoxDisplay("复位--阻挡气缸缩回");
     CAMiClsCylinder.StreamLine1StopRetract(); //阻挡气缸缩回
     CAMiClsCylinder.StreamLine2StopRetract(); //阻挡气缸缩回
     Main.frmMain.PauseCheck();
     Main.frmMain.ListBoxDisplay("复位--启动流线");
     GClsMontion.WriteCardExtendOutputBit(0, 8, 0); //流线1高速
     GClsMontion.WriteCardExtendOutputBit(0, 7, 0); //流线1正转
     GClsMontion.WriteCardExtendOutputBit(0, 6, 1); //流线1启动
     GClsMontion.WriteCardExtendOutputBit(1, 8, 0); //流线2高速
     GClsMontion.WriteCardExtendOutputBit(1, 7, 0); //流线2正转
     GClsMontion.WriteCardExtendOutputBit(1, 6, 1); //流线2启动
     Main.frmMain.PauseCheck();
 }
예제 #3
0
 public static void CldVacuum6Off()                         //破真空6
 {
     GClsMontion.WriteIOCard7432OutputBit(0, 5, 0);         //吸真空6
     GClsMontion.WriteIOCard7432OutputBit(0, 17, 1);        //破真空6
     GClsMontion.WaitIOCard7432InputBit(0, 5, 0, 3000, 56); //吸真空6感应
     GClsMontion.WriteIOCard7432OutputBit(0, 17, 0);        //破真空6
 }
예제 #4
0
 public static void CldVacuum7Off()                         //破真空7
 {
     GClsMontion.WriteIOCard7432OutputBit(0, 6, 0);         //吸真空7
     GClsMontion.WriteIOCard7432OutputBit(0, 18, 1);        //破真空7
     GClsMontion.WaitIOCard7432InputBit(0, 6, 0, 3000, 58); //吸真空7感应
     GClsMontion.WriteIOCard7432OutputBit(0, 18, 0);        //破真空7
 }
예제 #5
0
 public static void CldVacuum9Off()                         //破真空9
 {
     GClsMontion.WriteIOCard7432OutputBit(0, 8, 0);         //吸真空9
     GClsMontion.WriteIOCard7432OutputBit(0, 20, 1);        //破真空9
     GClsMontion.WaitIOCard7432InputBit(0, 8, 0, 3000, 62); //吸真空9感应
     GClsMontion.WriteIOCard7432OutputBit(0, 20, 0);        //破真空9
 }
예제 #6
0
 public static void CldVacuum2Off()                         //破真空2
 {
     GClsMontion.WriteIOCard7432OutputBit(0, 1, 0);         //吸真空2
     GClsMontion.WriteIOCard7432OutputBit(0, 13, 1);        //破真空2
     GClsMontion.WaitIOCard7432InputBit(0, 1, 0, 3000, 48); //吸真空2感应
     GClsMontion.WriteIOCard7432OutputBit(0, 13, 0);        //破真空2
 }
예제 #7
0
 public static void CldVacuum3Off()                         //破真空3
 {
     GClsMontion.WriteIOCard7432OutputBit(0, 2, 0);         //吸真空3
     GClsMontion.WriteIOCard7432OutputBit(0, 14, 1);        //破真空3
     GClsMontion.WaitIOCard7432InputBit(0, 2, 0, 3000, 50); //吸真空3感应
     GClsMontion.WriteIOCard7432OutputBit(0, 14, 0);        //破真空3
 }
예제 #8
0
 public static void StreamLine1VacuumOff()                   //流线1破真空
 {
     GClsMontion.WriteCardExtendOutputBit(0, 10, 0);         //流线1吸真空
     GClsMontion.WriteCardExtendOutputBit(0, 11, 1);         //流线1破真空
     GClsMontion.WaitCardExtendInputBit(0, 15, 0, 3000, 22); //流线1夹紧2气缸缩回感应
     GClsMontion.WriteCardExtendOutputBit(0, 11, 0);         //流线1吸真空感应
 }
예제 #9
0
 public static void StreamLine2VacuumOff()                    //流线2破真空
 {
     GClsMontion.WriteCardExtendOutputBit(1, 14, 0);          //流线2吸真空
     GClsMontion.WriteCardExtendOutputBit(1, 15, 1);          //流线2破真空
     GClsMontion.WaitCardExtendInputBit(1, 15, 0, 3000, 44);; //流线2吸真空感应
     GClsMontion.WriteCardExtendOutputBit(1, 15, 0);          //流线2破真空
 }
예제 #10
0
 public static void CldVacuum10Off()                        //破真空10
 {
     GClsMontion.WriteIOCard7432OutputBit(0, 9, 0);         //吸真空10
     GClsMontion.WriteIOCard7432OutputBit(0, 21, 1);        //破真空10
     GClsMontion.WaitIOCard7432InputBit(0, 9, 0, 3000, 64); //吸真空10感应
     GClsMontion.WriteIOCard7432OutputBit(0, 21, 0);        //破真空10
 }
예제 #11
0
 public static void StreamLine1LiftingDown()               //流线1顶升气缸缩回
 {
     GClsMontion.WriteCardExtendOutputBit(0, 1, 0);        //流线1顶升气缸伸出
     GClsMontion.WriteCardExtendOutputBit(0, 2, 1);        ////流线1顶升气缸缩回
     GClsMontion.WaitCardExtendInputBit(0, 2, 0, 3000, 6); //流线1顶升气缸伸出感应
     GClsMontion.WaitCardExtendInputBit(0, 3, 1, 3000, 8); //流线1顶升气缸缩回感应
 }
예제 #12
0
 public static void CldVacuum11Off()                         //破真空11
 {
     GClsMontion.WriteIOCard7432OutputBit(0, 10, 0);         //吸真空11
     GClsMontion.WriteIOCard7432OutputBit(0, 22, 1);         //破真空11
     GClsMontion.WaitIOCard7432InputBit(0, 10, 0, 3000, 66); //吸真空11感应
     GClsMontion.WriteIOCard7432OutputBit(0, 22, 0);         //破真空11
 }
예제 #13
0
 public static void CldVacuum12Off()                         //破真空12
 {
     GClsMontion.WriteIOCard7432OutputBit(0, 11, 0);         //吸真空12
     GClsMontion.WriteIOCard7432OutputBit(0, 23, 1);         //破真空12
     GClsMontion.WaitIOCard7432InputBit(0, 11, 0, 3000, 68); //吸真空12感应
     GClsMontion.WriteIOCard7432OutputBit(0, 23, 0);         //破真空12
 }
예제 #14
0
 public static void CldVacuum8Off()                         //破真空8
 {
     GClsMontion.WriteIOCard7432OutputBit(0, 7, 0);         //吸真空8
     GClsMontion.WriteIOCard7432OutputBit(0, 19, 1);        //破真空8
     GClsMontion.WaitIOCard7432InputBit(0, 7, 0, 3000, 60); //吸真空8感应
     GClsMontion.WriteIOCard7432OutputBit(0, 19, 0);        //破真空8
 }
예제 #15
0
 public static void CldVacuum5Off()                         //破真空5
 {
     GClsMontion.WriteIOCard7432OutputBit(0, 4, 0);         //吸真空5
     GClsMontion.WriteIOCard7432OutputBit(0, 16, 1);        //破真空5
     GClsMontion.WaitIOCard7432InputBit(0, 4, 0, 3000, 54); //吸真空5感应
     GClsMontion.WriteIOCard7432OutputBit(0, 16, 0);        //破真空5
 }
예제 #16
0
 public static void StreamLine2LiftingDown()                //流线2顶升气缸缩回
 {
     GClsMontion.WriteCardExtendOutputBit(1, 1, 0);         //流线2顶升气缸伸出
     //Thread.Sleep(10);
     GClsMontion.WriteCardExtendOutputBit(1, 2, 1);         //流线2顶升气缸缩回
     GClsMontion.WaitCardExtendInputBit(1, 2, 0, 3000, 28); //流线2顶升气缸伸出感应
     GClsMontion.WaitCardExtendInputBit(1, 3, 1, 3000, 30); //流线2顶升气缸缩回感应
 }
예제 #17
0
 public static void NGTrayUnload()//NG Tray下料
 {
     Main.frmMain.ListBoxDisplay("NG夹紧气缸松开");
     CAMiClsCylinder.NGlocationClampRetract();
     MessageBox.Show("请抽出NG料盘,并取走NG产品。然后按Tray按钮。");
     while (GClsMontion.ReadCardInputBit(1, 3) == 1)
     {
         Main.frmMain.ListBoxDisplay("NG夹紧气缸夹紧");
         CAMiClsCylinder.NGLocationClampExtend();//NG夹紧气缸夹紧
     }
 }
예제 #18
0
        public static int VaccumInitialJudge()//判断12个真空吸状态
        {
            int returnResult = 0;

            for (int i = 0; i < 12; i++)
            {
                if (GClsMontion.ReadIOCard7432InputBit(0, i) == 1)
                {
                    returnResult++;
                }
            }
            return(returnResult);
        }
예제 #19
0
        public static int WaitStremLineSensorOff()//判断流线上感应器是否全部OFF
        {
            int returnResult = 0;

            for (int i = 0; i < 3; i++)
            {
                if (GClsMontion.ReadCardExtendInputBit(0, (10 + i)) == 1)
                {
                    returnResult++;
                }
                if (GClsMontion.ReadCardExtendInputBit(1, (10 + i)) == 1)
                {
                    returnResult++;
                }
            }
            return(returnResult);
        }
예제 #20
0
 public static void NGTrayLoad()//NG Tray上料
 {
     while (GClsMontion.ReadIOCard7432InputBit(0, 28) == 0)
     {
         MessageBox.Show("请将料盘推到位!");
         Application.DoEvents();
         Thread.Sleep(1000);
     }
     while (GClsMontion.ReadIOCard7432InputBit(0, 29) == 0)
     {
         MessageBox.Show("请放置Tray盘");
         Application.DoEvents();
         Thread.Sleep(1000);
     }
     for (int i = 0; i < 12; i++)
     {
         CAMiClsVariable.isTrayCaveEmpty[i] = "1";//Tray穴位是否为空,清空数据,1为空
     }
     Main.frmMain.ListBoxDisplay("NG夹紧气缸夹紧");
     CAMiClsCylinder.NGLocationClampExtend();//NG夹紧气缸夹紧
 }
예제 #21
0
 public void MoveToTossingPos(int num)//马达移动到抛料位置
 {
     Main.frmMain.ListBoxDisplay("流线2--CCD2 Y轴运行到抛料位置");
     GClsMontion.AbsoluteMove(3, CAMiClsVariable.CCD2TossingPosYValue[0], CAMiClsVariable.speedCCD2Y, CAMiClsVariable.TaccCCD2Y);
     GClsMontion.WaitMotorStop(3);
     Main.frmMain.ListBoxDisplay("流线2--Z轴运行到抛料位置");
     GClsMontion.AbsoluteMove(4, CAMiClsVariable.CCD2flingPosZ, CAMiClsVariable.speedCCD2Z, CAMiClsVariable.TaccCCD2Z);
     GClsMontion.WaitMotorStop(4);
     Main.frmMain.PauseCheck();                                                                            //暂停
     Main.frmMain.ListBoxDisplay("流线2--关闭抛料穴位真空吸");                                                        //一个一个抛,关闭NG产品对应真空吸
     CAMiClsCylinder.GeneralClynderMotion(2, 0, num, 0);                                                   //真空吸Off
     CAMiClsCylinder.GeneralClynderMotion(2, 0, num + 12, 1);                                              //去真空On
     CAMiClsCylinder.GeneralClynderMotionSensor(2, 0, num, 0, 3000, 44 + (num + 1) * 2);
     CAMiClsCylinder.GeneralClynderMotion(2, 0, num + 12, 0);                                              //去真空Off
     if (CAMiClsVariable.strProduct != "P104")                                                             //当项目为D4X时
     {
         if (num < 8)                                                                                      //--------------带小气缸机台部分
         {
             CAMiClsCylinder.GeneralClynderMotion(2, 0, num + 24, 0);                                      //小气缸
             CAMiClsCylinder.GeneralClynderMotionSensor(2, 0, num + 12, 0, 3000, 44 + (num + 12 + 1) * 2); //小气缸感应off
         }
         if (num == 8)
         {
             CAMiClsCylinder.CldSmallControl9Retract();
         }
         if (num == 9)
         {
             CAMiClsCylinder.CldSmallControl10Retract();
         }
         if (num == 10)
         {
             CAMiClsCylinder.CldSmallControl11Retract();
         }
         if (num == 11)
         {
             CAMiClsCylinder.CldSmallControl12Retract();
         }
     }
 }
예제 #22
0
        /// <summary>
        /// 控制气缸动作
        /// </summary>
        /// <param name="type">0:轴卡上的4输出通道;1:轴卡扩展的16输出通道;2:7432 IO卡输出</param>
        /// <param name="cardNo">代表第几张卡,从0开始</param>
        /// <param name="pointNo">代表第几个点位,从0开始</param>
        /// <param name="onOff">输出状态,0:Off;1:On</param>
        public static void GeneralClynderMotion(int type, int cardNo, int pointNo, int onOff)//阻挡气缸伸出
        {
            try
            {
                switch (type)
                {
                case 0:
                    GClsMontion.WriteCardOutputBit(cardNo, pointNo, onOff); //轴卡上的4输出通道
                    break;

                case 1:
                    GClsMontion.WriteCardExtendOutputBit(cardNo, pointNo, onOff);//轴卡扩展的16输出通道
                    break;

                case 2:
                    ushort uCardNo  = (ushort)cardNo;
                    ushort uPointNo = (ushort)pointNo;
                    ushort uOnOff   = (ushort)onOff;
                    if (CAMiClsVariable.strIOCard == "7432")
                    {
                        GClsMontion.WriteIOCard7432OutputBit(uCardNo, uPointNo, uOnOff);//7432 IO卡输出
                    }
                    else
                    {
                        GClsMontion.WriteAPEIOCardOutputBit(cardNo, pointNo, onOff);//APE IO卡输出
                    }
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #23
0
 public static void CldSmallControl11Retract()               //小气缸控制11缩回
 {
     GClsMontion.WriteCardOutputBit(1, 2, 0);                //小气缸控制11伸出
     GClsMontion.WaitIOCard7432InputBit(0, 22, 0, 3000, 90); //吸排线气缸11动作感应
 }
예제 #24
0
 public static void CldSmallControl11Extend()                //小气缸控制11伸出
 {
     GClsMontion.WriteCardOutputBit(1, 2, 1);                //小气缸控制11伸出
     GClsMontion.WaitIOCard7432InputBit(0, 22, 1, 3000, 89); //吸排线气缸11动作感应
 }
예제 #25
0
 public static void CldSmallControl10Retract()               //小气缸控制10缩回
 {
     GClsMontion.WriteCardOutputBit(1, 1, 0);                //小气缸控制10伸出
     GClsMontion.WaitIOCard7432InputBit(0, 21, 0, 3000, 88); //吸排线气缸10动作感应
 }
예제 #26
0
 public static void CldSmallControl10Extend()                //小气缸控制10伸出
 {
     GClsMontion.WriteCardOutputBit(1, 1, 1);                //小气缸控制10伸出
     GClsMontion.WaitIOCard7432InputBit(0, 21, 1, 3000, 87); //吸排线气缸10动作感应
 }
예제 #27
0
 public static void CldSmallControl9Retract()                //小气缸控制9缩回
 {
     GClsMontion.WriteCardOutputBit(1, 0, 0);                //小气缸控制9伸出
     GClsMontion.WaitIOCard7432InputBit(0, 20, 0, 3000, 86); //吸排线气缸9动作感应
 }