/// <summary> /// Executes a homing sequence based on the settings within the HomingParams variable /// </summary> public void StartDoHome() { _Controller.SetUserData(_HomingParams.StatusBit, (int)HOMING_STATE.NOT_HOMED); string autofile = ""; switch (_HomingParams.SourceType) { case HOMING_ROUTINE_SOURCE_TYPE.AUTO: autofile = WriteHomingToFile(GetAutoHomingFileSource()); break; case HOMING_ROUTINE_SOURCE_TYPE.FROM_FILE: autofile = _HomingParams.Homing_c_Program; break; case HOMING_ROUTINE_SOURCE_TYPE.FROM_STRING: autofile = WriteHomingToFile(_HomingParams.Homing_c_Program); break; case HOMING_ROUTINE_SOURCE_TYPE.FROM_THREAD: _Controller.ExecuteProgram(_HomingParams.DefaultThread); return; default: break; } _Controller.ExecuteProgram(_HomingParams.DefaultThread, autofile, true); }