Esempio n. 1
0
        bool IPIZ.Zero()
        {
            bool          ret           = true;
            string        sErrMsg       = string.Empty;
            StringBuilder sErrorMessage = new StringBuilder(1024);
            int           iError;

            double[] dPos = new double[3];
            dPos[0] = 0;
            // call the MOV command (for closed servo loop).
            if (PI_GCS.MOV(m_iControllerId, m_sAxisName, dPos) == 0)
            {
                iError = PI_GCS.GetError(m_iControllerId);
                PI_GCS.TranslateError(iError, sErrorMessage, sErrorMessage.Capacity);
                sErrMsg = "ERROR From MOV " + iError.ToString() + ": " + sErrorMessage.ToString();
                ret     = false;
            }
            return(ret);
        }
Esempio n. 2
0
        bool IPIZ.MoveToAbsPos(double dbPos)
        {
            bool          ret           = true;
            string        sErrMsg       = string.Empty;
            StringBuilder sErrorMessage = new StringBuilder(1024);
            int           iError;

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