void IPIZ.SetCloseMode(bool isCloseLoop) { string sErrMsg = string.Empty; StringBuilder sErrorMessage = new StringBuilder(1024); int iError; int[] bFlags = new int[3]; // Switch on the Servo for all axes // Set servo-control "on" or "off" (closed-loop/open-loop mode) bFlags[0] = isCloseLoop == true ? 1 : 0;// servo on for the axis in the string 'axes'. // call the SerVO mode command. if (PI_GCS.SVO(m_iControllerId, m_sAxisName, bFlags) == 0) { iError = PI_GCS.GetError(m_iControllerId); PI_GCS.TranslateError(iError, sErrorMessage, sErrorMessage.Capacity); sErrMsg = "ERROR From SVO " + iError.ToString() + ": " + sErrorMessage.ToString(); } return; }