Added PVs for error reset and status problem reporting and fixed a bug
in msgPrintControl
This commit is contained in:
@ -41,11 +41,29 @@ record(motor,"$(INSTR)$(M)")
|
||||
field(RMOD,"3") # Retry mode 3 ("In-Position"): This suppresses any retries from the motor record.
|
||||
}
|
||||
|
||||
# This PV reads out the 10th bit of the MSTA field of the motor record, which
|
||||
# is the "motorStatusProblem_" bit. The 10th bit is adressed by 0x0200. If the
|
||||
# bit is 0, the .VAL field is 0 as well. If the bit is 1, we need to divide by
|
||||
# 512 (=2^9) in order to set the .VAL field to 1 (and not to 512).
|
||||
record(calc, "$(INSTR)$(M):StatusProblem")
|
||||
{
|
||||
field(INPA, "$(INSTR)$(M).MSTA CP")
|
||||
field(CALC, "(A&0x200)/512")
|
||||
}
|
||||
|
||||
# Call the reset function of the corresponding sinqAxis
|
||||
# This record is coupled to the parameter library via motorReset_ -> MOTOR_RESET.
|
||||
record(longout, "$(INSTR)$(M):Reset") {
|
||||
field(DTYP, "asynInt32")
|
||||
field(OUT, "@asyn($(CONTROLLER),$(AXIS),1) MOTOR_RESET")
|
||||
field(PINI, "NO")
|
||||
}
|
||||
|
||||
# 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.
|
||||
# This record is coupled to the parameter library via motorForceStop_ -> MOTOR_FORCE_STOP.
|
||||
record(longin, "$(INSTR)$(M):STOP_RBV")
|
||||
record(longin, "$(INSTR)$(M):StopRBV")
|
||||
{
|
||||
field(DTYP, "asynInt32")
|
||||
field(INP, "@asyn($(CONTROLLER),$(AXIS)) MOTOR_FORCE_STOP")
|
||||
@ -53,7 +71,7 @@ record(longin, "$(INSTR)$(M):STOP_RBV")
|
||||
field(FLNK, "$(INSTR)$(M):Stop2Field")
|
||||
}
|
||||
record(longout, "$(INSTR)$(M):Stop2Field") {
|
||||
field(DOL, "$(INSTR)$(M):STOP_RBV CP")
|
||||
field(DOL, "$(INSTR)$(M):StopRBV CP")
|
||||
field(OUT, "$(INSTR)$(M).STOP")
|
||||
field(OMSL, "closed_loop")
|
||||
}
|
||||
|
Reference in New Issue
Block a user