If URIP=Yes and reading RDBL causes LINK error, do not start a new target position move.

(cherry picked from commit 7493d50bc8)
This commit is contained in:
sluiter
2018-04-10 14:30:50 -05:00
committed by kpetersn
parent 427890142f
commit 66e8dcb485
+34 -9
View File
@@ -187,6 +187,8 @@ USAGE... Motor Record Support.
* processing was standard. If processing is needed on a DMOV false to true
* 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.
* .76 04-04-18 rls - If URIP is Yes and RDBL is inaccessible (e.g., CA server is down), do not start
* a new target position move (sans Home search or Jog).
*/
#define VERSION 6.10
@@ -1628,6 +1630,8 @@ LOGIC:
IF this is not a retry.
Reset retry counter and mark RCNT for dbposting.
ELSE
Process retry based on retry mode (RMOD).
ENDIF
IF (relative move indicator is OFF, AND, sign of absolute move
@@ -1639,16 +1643,23 @@ LOGIC:
Set preferred direction indicator OFF.
ENDIF
IF the dial DIFF is within the retry deadband.
IF MIP state is DONE.
Update last target positions.
Terminate move. Set DMOV TRUE.
ENDIF
NORMAL RETURN.
Process soft-travel limit.
IF URIP is set to Yes
Test and set indicator on RDBL access in case it is a CA link that is down.
ENDIF
IF soft-travel limit error, OR, RDBL CA server disconnect error.
Restore previous target positions.
IF MIP indicates this is a retry.
Set MIP to Done.
ENDIF
IF MIP indicates Done Moving and DMOV is False
Set DMOV true.
ENDIF
ENDIF
....
....
IF motion in progress indicator is false.
IF motion in progress indicator (MIP) is Done or Retry.
Set MIP MOVE indicator ON and mark for posting.
IF DMOV is TRUE.
Set DMOV to FALSE and mark for posting.
@@ -2160,7 +2171,7 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind)
double relbpos = ((pmr->dval - pmr->bdst) - pmr->drbv) / pmr->mres;
double rbdst1 = 1.0 + (fabs(pmr->bdst) / fabs(pmr->mres));
long rdbdpos = NINT(pmr->rdbd / fabs(pmr->mres)); /* retry deadband steps */
long rpos, npos;
long rpos, npos, rtnstat;
msta_field msta;
msta.All = pmr->msta;
@@ -2279,9 +2290,23 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind)
}
}
if (pmr->urip == motorUEIP_Yes)
{
double test_drbv;
rtnstat = dbGetLink(&(pmr->rdbl), DBR_DOUBLE, &test_drbv, 0, 0 );
if (RTN_SUCCESS(rtnstat))
rtnstat = TRUE;
else
rtnstat = FALSE;
}
else
rtnstat = TRUE;
if (pmr->lvio != old_lvio)
MARK(M_LVIO);
if (pmr->lvio)
/* Test for travel limit violation, OR, URIP is True, but CA server is disconnected.*/
if (pmr->lvio || rtnstat == FALSE)
{
pmr->val = pmr->lval;
MARK(M_VAL);