/// <summary> /// Try to fetch RW options from this robot. /// </summary> /// <returns></returns> private bool LoadRobotWareOptions() { try { this.robotWare = this.controller.RobotWare; this.robotWareOptions = this.robotWare.Options; this._hasMultiTasking = HasMultiTaskOption(this.robotWareOptions); this._hasEGM = HasEGMOption(this.robotWareOptions); logger.Debug("RobotWare " + controller.RobotWare); logger.Debug("RobotWareVersion " + controller.RobotWareVersion); logger.Debug("hasMultiTasking? " + this._hasMultiTasking); logger.Debug("hasEGM? " + this._hasEGM); return(true); } catch { this.robotWare = null; this.robotWareOptions = null; this._hasMultiTasking = false; this._hasEGM = false; logger.Debug("Could not access ROBOTWARE options"); } return(false); }
/// <summary> /// Does this robot have the Externally Guided Motion option? /// </summary> /// <param name="options"></param> /// <returns></returns> private bool HasEGMOption(RobotWareOptionCollection options) { var available = false; foreach (RobotWareOption option in options) { if (option.Description.Contains("689-1")) { available = true; break; } } return(available); }