Beispiel #1
0
        /// <summary>
        /// 获取单卡 负极限输入状态
        /// </summary>
        /// <param name="card"></param>
        /// <param name="pValue"></param>
        /// <returns></returns>
        public short _SR_GetLimitNInput(short card, short axisNum, out bool pValue)
        {
            int status = Dmc1000.d1000_get_axis_status(card * tag_AxisCount + axisNum);
            int bit    = (int)Math.Pow(2, 0);

            if ((status & bit) == bit)
            {
                pValue = true;
            }
            else
            {
                pValue = false;
            }
            return(0);
        }
Beispiel #2
0
        /// <summary>
        /// 获取单卡 原点输入状态
        /// </summary>
        /// <param name="card"></param>
        /// <param name="pValue">原点状态值,按位取</param>
        /// <returns></returns>
        public short _SR_GetOriginInput(short card, short axisNum, out bool pValue)
        {
            pValue = false;
            if (tag_CardCount < 1 || card >= tag_CardCount)
            {
                return(-1);
            }
            int status = Dmc1000.d1000_get_axis_status(card * tag_AxisCount + axisNum);

            int bit = (int)Math.Pow(2, 2);

            if ((status & bit) == bit)
            {
                pValue = true;
            }
            else
            {
                pValue = false;
            }
            return(0);
        }