Merge pull request #114 from EuropeanSpallationSource/add_SPDB_v1

Add field SPDB, "Set Point Dead Band"
This commit is contained in:
Kevin Peterson
2018-12-11 13:19:05 -06:00
committed by GitHub
3 changed files with 36 additions and 0 deletions
+18
View File
@@ -867,6 +867,14 @@ below.
<td><br>
</td>
</tr>
<tr>
<td><a href="#Fields_motion">SPBD</a></td>
<td>R/W</td>
<td>Set Point Deadband (EGU)</td>
<td>DOUBLE</td>
<td><br>
</td>
</tr>
<tr>
<td><a href="#Fields_link">RDBL</a></td>
<td>R</td>
@@ -1830,6 +1838,16 @@ below.
performed (see RTRY).&nbsp;</td>
</tr>
<tr valign="top">
<td>SPBD</td>
<td>R/W</td>
<td>Set Point Deadband (EGU)</td>
<td>DOUBLE</td>
<td>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.
</td>
</tr>
<tr valign="top">
<td>RTRY</td>
<td>R/W</td>
<td>Max retry count</td>
+12
View File
@@ -2234,6 +2234,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;
+6
View File
@@ -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)