Added motor target position record which allows to read out the motor
target position from within a driver.
This commit is contained in:
@ -41,6 +41,16 @@ record(motor,"$(INSTR)$(M)")
|
||||
field(RMOD,"3") # Retry mode 3 ("In-Position"): This suppresses any retries from the motor record.
|
||||
}
|
||||
|
||||
# This record holds a copy of the motor record target position field (.VAL) and allows to access
|
||||
# the value from within the driver via the index motorTargetPosition_.
|
||||
# This record is coupled to the parameter library via motorTargetPosition_ -> MOTOR_TARGET_POSITION.
|
||||
record(ao,"$(INSTR)$(M):TargetPosition") {
|
||||
field(DOL, "$(INSTR)$(M).VAL CP MS")
|
||||
field(OMSL, "closed_loop")
|
||||
field(DTYP, "asynFloat64")
|
||||
field(OUT, "@asyn($(CONTROLLER),$(AXIS)) MOTOR_TARGET_POSITION")
|
||||
}
|
||||
|
||||
# This PV allows force-stopping the motor record from within the driver by setting
|
||||
# the motorForceStop_ value in the parameter library to 1. It should be reset to 0 by the driver afterwards.
|
||||
# The implementation strategy is taken from https://epics.anl.gov/tech-talk/2022/msg00464.php.
|
||||
|
@ -235,6 +235,7 @@ class epicsShareClass sinqController : public asynMotorController {
|
||||
|
||||
#define FIRST_SINQMOTOR_PARAM motorMessageText_
|
||||
int motorMessageText_;
|
||||
int motorTargetPosition_;
|
||||
int motorEnable_;
|
||||
int motorEnableRBV_;
|
||||
int motorCanDisable_;
|
||||
|
Reference in New Issue
Block a user