Пример #1
0
        /// <summary>
        /// Polling an encorder data.
        /// </summary>
        /// <returns>System.Double.</returns>
        /// <exception cref="InvalidOperationException">GPTC_Read Fail, error:  " + err</exception>
        public double EncoderPolling()
        {
            uint  value;
            short err = DASK.GPTC_Read(GetHandle(), gptcCtrl.GCtr[0], out value);

            if (err < 0)
            {
                throw new InvalidOperationException("GPTC_Read Fail, error:  " + err);
            }
            return(Math.Abs((value * 256) / 256));;
        }