Skip to content

DVAL & OFF are incorrect after a LOAD_POS fails #231

@kmpeters

Description

@kmpeters

The DVAL & OFF are incorrect after a LOAD_POS fails. The issue was first reported by motorAcsMotion users of axes with absolute encoders that never want the dial position to be reset. Documentation of this issue started in the motorAcsMotion repo:

epics-motor/motorAcsMotion#70

It appears that the motor record assumes the LOAD_POS operation will never fail:

/* Load pos. into motor controller. Get new readback vals. */
INIT_MSG();
WRITE_MSG(LOAD_POS, &newpos);
SEND_MSG();
INIT_MSG();
WRITE_MSG(GET_INFO, NULL);
SEND_MSG();

And the only thing the asyn device support does when the LOAD_POS operation fails is print an error message:

case motorMoveAbs:
case motorMoveRel:
case motorHome:
case motorPosition:
case motorMoveVel:
commandIsMove = 1;
/* Intentional fall-through */
default:
if (pmsg->interface == int32Type) {
status = pPvt->pasynInt32->write(pPvt->asynInt32Pvt, pasynUser,
pmsg->ivalue);
} else {
status = pPvt->pasynFloat64->write(pPvt->asynFloat64Pvt, pasynUser,
pmsg->dvalue);
}
if (status != asynSuccess) {
asynPrint(pasynUser, ASYN_TRACE_ERROR,
"devMotorAsyn::asynCallback: %s pasyn{Float64,Int32}->write returned %s\n",
pmr->name, pasynUser->errorMessage);

It might be necessary to add a field to the motor record to prevent the LOAD_POS message from ever being sent to device support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions