コード例 #1
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);
            }
        }
コード例 #2
0
 public static void CldSmallControl12Retract()               //小气缸控制12缩回
 {
     GClsMontion.WriteCardOutputBit(1, 3, 0);                //小气缸控制12伸出
     GClsMontion.WaitIOCard7432InputBit(0, 23, 0, 3000, 92); //吸排线气缸12动作感应
 }
コード例 #3
0
 public static void CldSmallControl12Extend()                //小气缸控制12伸出
 {
     GClsMontion.WriteCardOutputBit(1, 3, 1);                //小气缸控制12伸出
     GClsMontion.WaitIOCard7432InputBit(0, 23, 1, 3000, 91); //吸排线气缸12动作感应
 }
コード例 #4
0
 public static void CldSmallControl11Retract()               //小气缸控制11缩回
 {
     GClsMontion.WriteCardOutputBit(1, 2, 0);                //小气缸控制11伸出
     GClsMontion.WaitIOCard7432InputBit(0, 22, 0, 3000, 90); //吸排线气缸11动作感应
 }
コード例 #5
0
 public static void CldSmallControl11Extend()                //小气缸控制11伸出
 {
     GClsMontion.WriteCardOutputBit(1, 2, 1);                //小气缸控制11伸出
     GClsMontion.WaitIOCard7432InputBit(0, 22, 1, 3000, 89); //吸排线气缸11动作感应
 }
コード例 #6
0
 public static void CldSmallControl10Retract()               //小气缸控制10缩回
 {
     GClsMontion.WriteCardOutputBit(1, 1, 0);                //小气缸控制10伸出
     GClsMontion.WaitIOCard7432InputBit(0, 21, 0, 3000, 88); //吸排线气缸10动作感应
 }
コード例 #7
0
 public static void CldSmallControl10Extend()                //小气缸控制10伸出
 {
     GClsMontion.WriteCardOutputBit(1, 1, 1);                //小气缸控制10伸出
     GClsMontion.WaitIOCard7432InputBit(0, 21, 1, 3000, 87); //吸排线气缸10动作感应
 }
コード例 #8
0
 public static void CldSmallControl9Retract()                //小气缸控制9缩回
 {
     GClsMontion.WriteCardOutputBit(1, 0, 0);                //小气缸控制9伸出
     GClsMontion.WaitIOCard7432InputBit(0, 20, 0, 3000, 86); //吸排线气缸9动作感应
 }
コード例 #9
0
 public static void CldSmallControl9Extend()                 //小气缸控制9伸出
 {
     GClsMontion.WriteCardOutputBit(1, 0, 1);                //小气缸控制9伸出
     GClsMontion.WaitIOCard7432InputBit(0, 20, 1, 3000, 85); //吸排线气缸9动作感应
 }