diff --git a/docs/motorRecord.html b/docs/motorRecord.html index df4721b9..75ccf804 100644 --- a/docs/motorRecord.html +++ b/docs/motorRecord.html @@ -867,6 +867,14 @@ below.
+ + SPBD + R/W + Set Point Deadband (EGU) + DOUBLE +
+ + RDBL R @@ -1830,6 +1838,16 @@ below. performed (see RTRY).  + SPBD + R/W + Set Point Deadband (EGU) + DOUBLE + Before the motor is commanded a move, a check is done if the move is to small. + It is to small when the distance is less the the step size defined in MRES. + When a bigger deadband is wanted than MRES, set the value into SPDB. + + + RTRY R/W Max retry count diff --git a/motorApp/MotorSrc/motorRecord.cc b/motorApp/MotorSrc/motorRecord.cc index dd8cacb7..9fefca4b 100644 --- a/motorApp/MotorSrc/motorRecord.cc +++ b/motorApp/MotorSrc/motorRecord.cc @@ -2239,6 +2239,18 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind) { if (abs(npos - rpos) < 1) too_small = true; + if (!too_small) + { + double spdb = pmr->spdb; + if (spdb > 0) { + /* Don't move if new setpoint is within SPDB of DRBV */ + double drbv = pmr->drbv; + double dval = pmr->dval; + if (((dval - spdb) < drbv) && ((dval + spdb) > drbv)) { + too_small = true; + } + } + } } else if (abs(npos - rpos) < rdbdpos) too_small = true; diff --git a/motorApp/MotorSrc/motorRecord.dbd b/motorApp/MotorSrc/motorRecord.dbd index aa455cba..0e2d11c6 100644 --- a/motorApp/MotorSrc/motorRecord.dbd +++ b/motorApp/MotorSrc/motorRecord.dbd @@ -415,6 +415,12 @@ recordtype(motor) { special(SPC_MOD) interest(1) } + field(SPDB,DBF_DOUBLE) { + prompt("Setpoint Deadband (EGU)") + promptgroup(GUI_COMMON) + special(SPC_MOD) + interest(1) + } field(RCNT,DBF_SHORT) { prompt("Retry count") special(SPC_NOMOD)