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

            ////////////////////////////////////////
            // Read the moving state of the axes. //
            ////////////////////////////////////////
            int[] bIsOnTarget = new int[3];
            if (PI_GCS.qONT(m_iControllerId, m_sAxisName, bIsOnTarget) == 0)
            {
                iError = PI_GCS.GetError(m_iControllerId);
                PI_GCS.TranslateError(iError, sErrorMessage, sErrorMessage.Capacity);
                sErrMsg = "ERROR From IsMoving " + iError.ToString() + ": " + sErrorMessage.ToString();
                ret     = false;
            }
            else
            {
                ret = bIsOnTarget[0] == 1 ? true : false;
            }
            return(ret);
        }