Ejemplo n.º 1
0
        /// <summary>
        ///     获取规划位置
        /// </summary>
        /// <param name="nCardNum"></param>
        /// <param name="nAxis">轴</param>
        /// <param name="dVal">值</param>
        /// <param name="count">轴数量</param>
        /// <returns></returns>
        public override short GetPrfPos(short nCardNum, short nAxis, out double dVal, short count)
        {
            short nRtn = 0;

            nRtn |= CMc.GT_GetPrfPos(nCardNum, nAxis, out dVal, count, out m_oClk);
            return(nRtn);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     相对距离移动
        /// </summary>
        /// <param name="nCardNum"></param>
        /// <param name="nAxis">轴号</param>
        /// <param name="dVel">速度</param>
        /// <param name="dAcce">加减速度</param>
        /// <param name="dOffset">相对移动量,单位脉冲</param>
        /// <returns></returns>
        public override short RMove(short nCardNum, short nAxis, double dVel, double dAcce, double dOffset)
        {
            short nRtn = 0;


            //开始运动
            double dCurrentPos;

            nRtn |= CMc.GT_GetPrfPos(nCardNum, nAxis, out dCurrentPos, 1, out m_oClk);

            var lPrfpos = dOffset + dCurrentPos;

            AbsMove(nCardNum, nAxis, (int)lPrfpos, dVel, dAcce);

            return(nRtn);
        }