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

            /////////////////////////////////////////
            // Get the name of the connected axis. //
            /////////////////////////////////////////
            if (PI_GCS.qSAI(m_iControllerId, sAxes, sAxes.Capacity) == 0)
            {
                iError = PI_GCS.GetError(m_iControllerId);
                PI_GCS.TranslateError(iError, sErrorMessage, sErrorMessage.Capacity);
                sErrMsg = "ERROR From SAI? " + iError.ToString() + ": " + sErrorMessage.ToString();
                ret     = false;
            }
            m_sAxisName = sAxes.ToString();
            return(ret);
        }