Ejemplo n.º 1
0
        /// <summary>
        /// pi stages doesn't have physical origin
        /// </summary>
        /// <param name="axes"></param>
        /// <param name="sErrMsg"></param>
        public void GoHome(string axes, ref string sErrMsg)
        {
            StringBuilder sErrorMessage = new StringBuilder(1024);
            int           iError;

            double[] dPos = new double[3];
            dPos[0] = 0;
            // call the MOV command (for closed servo loop).
            if (PICommand.MOV(m_iControllerId, axes, dPos) == 0)
            {
                iError = PICommand.GetError(m_iControllerId);
                PICommand.TranslateError(iError, sErrorMessage, sErrorMessage.Capacity);
                sErrMsg = "ERROR From MOV " + iError.ToString() + ": " + sErrorMessage.ToString();
            }
        }
Ejemplo n.º 2
0
        public void MoveToAbsolutePos(string axes, double dbAbsPos, ref string sErrMsg)
        {
            StringBuilder sErrorMessage = new StringBuilder(1024);
            int           iError;

            double[] dPos = new double[3];
            // move all axes the corresponding position in 'dPos'
            dPos[0] = dbAbsPos;
            // call the MOV command (for closed servo loop).
            if (PICommand.MOV(m_iControllerId, axes, dPos) == 0)
            {
                iError = PICommand.GetError(m_iControllerId);
                PICommand.TranslateError(iError, sErrorMessage, sErrorMessage.Capacity);
                sErrMsg = "ERROR From MOV " + iError.ToString() + ": " + sErrorMessage.ToString();
            }
        }