From db5da2f075fa98f177e82388312e2686fb6e3a26 Mon Sep 17 00:00:00 2001 From: sluiter Date: Fri, 19 May 2017 10:19:36 -0500 Subject: [PATCH] Stop motor if URIP is Yes and RDBL read returns an error. --- motorApp/MotorSrc/motorRecord.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/motorApp/MotorSrc/motorRecord.cc b/motorApp/MotorSrc/motorRecord.cc index 919831c1..ff9f6dc0 100644 --- a/motorApp/MotorSrc/motorRecord.cc +++ b/motorApp/MotorSrc/motorRecord.cc @@ -185,7 +185,8 @@ USAGE... Motor Record Support. * Changed error checks from dial to user limits. * .74 09-28-16 rls - Reverted .71 FLNK change. Except for the condition that DMOV == FALSE, FLNK * processing was standard. If processing is needed on a DMOV false to true - * transition, a new motor record field should be added. + * transition, a new motor record field should be added. + * .75 05-18-17 rls - Stop motor if URIP is Yes and RDBL read returns an error. */ #define VERSION 6.10 @@ -3573,7 +3574,16 @@ static void process_motor_info(motorRecord * pmr, bool initcall) rtnstat = dbGetLink(&(pmr->rdbl), DBR_DOUBLE, &rdblvalue, 0, 0 ); if (!RTN_SUCCESS(rtnstat)) + { Debug(3, "process_motor_info: error reading RDBL link.\n"); + if (pmr->mip != MIP_DONE) + { + /* Error reading RDBL - stop move. */ + clear_buttons(pmr); + pmr->stop = 1; + MARK(M_STOP); + } + } else { pmr->rrbv = NINT((rdblvalue * pmr->rres) / pmr->mres);