public double GetCurrentPos(string axes, ref string sErrMsg) { StringBuilder sErrorMessage = new StringBuilder(1024); int iError; double[] dPos = new double[3]; // call the command to querry the current POSition of axes. if (PICommand.qPOS(m_iControllerId, axes, dPos) == 0) { iError = PICommand.GetError(m_iControllerId); PICommand.TranslateError(iError, sErrorMessage, sErrorMessage.Capacity); sErrMsg = "ERROR From Pos?" + iError.ToString() + ": " + sErrorMessage.ToString(); return(0.0); } return(dPos[0]); }