From 28875dec252d38c720affa13b504f7cb3910a90a Mon Sep 17 00:00:00 2001 From: smathis Date: Mon, 8 Jun 2026 13:19:01 +0200 Subject: [PATCH] Allow moving a non-homed motor (but print a warning) --- src/sinqAxis.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/sinqAxis.cpp b/src/sinqAxis.cpp index a7b0a3d..2c3e374 100644 --- a/src/sinqAxis.cpp +++ b/src/sinqAxis.cpp @@ -358,15 +358,17 @@ asynStatus sinqAxis::move(double position, int relative, double minVelocity, // ========================================================================= /* - Check if the motor is allowed to move: If the motor hasn't been homed in the - past and has an incremental encoder, it needs to be homed first! + If the motor has an incremental encoder and has not been homed yet, inform + the user with a warning, but allow the move anyway. */ getAxisParamChecked(this, encoderType, &encType); getAxisParamChecked(this, motorStatusHomed, &motorStatHomed); if (strcmp(encType, IncrementalEncoder) == 0 && motorStatHomed == 0) { - setAxisParamChecked(this, motorErrorMessage, - "Motor needs to be homed first."); - return asynError; + asynPrint(pC_->pasynUser(), ASYN_TRACE_WARNING, + "Controller \"%s\", axis %d => %s, line " + "%d:\nMoving axis with incremental encoder which hasn't been " + "homed yet. Reported position values might be wrong.\n", + pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__); } // Store the target position internally