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.
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:
motor/motorApp/MotorSrc/motorRecord.cc
Lines 3810 to 3816 in 285f44d
And the only thing the asyn device support does when the LOAD_POS operation fails is print an error message:
motor/motorApp/MotorSrc/devMotorAsyn.c
Lines 694 to 712 in 285f44d
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.