UDF state is not shown during initialization anymore
These changes process the AdjustOrigin record during initialization to make sure its .STAT field does not show "UDF" anymore before the first processing. The gate record makes sure that no command is send to the underlying hardware during initial processing.
This commit is contained in:
@ -58,7 +58,6 @@ record(ai, "$(INSTR)$(M):Origin") {
|
||||
field(INP, "@asyn($(CONTROLLER),$(AXIS)) MOTOR_ORIGIN")
|
||||
field(SCAN, "I/O Intr")
|
||||
field(PINI, "NO")
|
||||
field(VAL, "0")
|
||||
}
|
||||
|
||||
# Shift the origin of the corresponding axis by the given value. The axis will move to this
|
||||
@ -66,19 +65,31 @@ record(ai, "$(INSTR)$(M):Origin") {
|
||||
# new "0" value. This PV does nothing for "normal" Turbo PMAC axes.
|
||||
record(ao, "$(INSTR)$(M):AdjustOrigin") {
|
||||
field(DTYP, "Raw Soft Channel")
|
||||
field(PINI, "NO")
|
||||
field(PINI, "YES")
|
||||
field(FLNK, "$(INSTR)$(M):ResetAO")
|
||||
field(VAL, "0")
|
||||
field(UDF, "FALSE")
|
||||
field(SCAN, "Passive")
|
||||
}
|
||||
|
||||
# Only forward nonzero inputs for the origin adjustment
|
||||
record(calc, "$(INSTR)$(M):GateOrigin") {
|
||||
field(CALC, "A!=0?A:VAL")
|
||||
field(INPA, "$(INSTR)$(M):AdjustOrigin")
|
||||
field(OUT, "$(INSTR)$(M):WriteAO.VAL PP") # Forward the value to the driver
|
||||
field(PINI, "NO")
|
||||
field(SCAN, "Passive")
|
||||
}
|
||||
|
||||
# Reset the PV $(INSTR)$(M):AdjustOrigin to zero after it has been written to and
|
||||
# forward the value to $(INSTR)$(M):WriteAO which does the actual writing.
|
||||
record(seq, "$(INSTR)$(M):ResetAO") {
|
||||
field(DESC, "Write value to hardware then reset to 0")
|
||||
field(DOL1, "$(INSTR)$(M):AdjustOrigin")
|
||||
field(LNK1, "$(INSTR)$(M):WriteAO.VAL PP") # Perform write to hardware
|
||||
field(DOL1, "1") # Dummy value which is only here to trigger processing of LNK1
|
||||
field(LNK1, "$(INSTR)$(M):GateOrigin.PROC PP")
|
||||
field(DOL2, "0.0")
|
||||
field(LNK2, "$(INSTR)$(M):AdjustOrigin.VAL PP") # Reset to zero
|
||||
field(UDF, "FALSE")
|
||||
}
|
||||
|
||||
# This record forwards the adjustment of the origin to the asyn driver.
|
||||
|
Reference in New Issue
Block a user