public void SetLoopMode(string axes, ref string sErrMsg, bool bIsCloseModeOn) { 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] = bIsCloseModeOn == true ? 1 : 0;// servo on for the axis in the string 'axes'. // call the SerVO mode command. if (PICommand.SVO(m_iControllerId, axes, bFlags) == 0) { iError = PICommand.GetError(m_iControllerId); PICommand.TranslateError(iError, sErrorMessage, sErrorMessage.Capacity); sErrMsg = "ERROR From SVO " + iError.ToString() + ": " + sErrorMessage.ToString(); return; } }