# adapted from injCollinOut.template # ### MACROS ## P: PV of associated motor ## POS: Name of position ## EGU: Engineering units (default = mm) ## PREC: Precision (default = 4) ## VAL: Motor value of position ## DBND: position deadband +- ## GOPREV: Value for GOPRE action (default = "") ## GOPRE: Action to perform before moving to position (default = ""). For example enable motor or perform some sequence. ## GOPOSTV: Value for GOPOST action (default = "") ## GOPOST: Action to perform after arriving at position (default = ""). For example disable motor or perform some sequence. # record(ao, "$(P):$(POS)Position") { field(DESC, "$(POS_DESC)") field(EGU, "$(EGU=mm)") field(PREC, "$(PREC=4)") field(VAL, "$(VAL)") info(autosaveFields, "VAL DESC") } record(ao, "$(P):$(POS)Deadband"){ field(DESC, "$(POS) position deadband") field(EGU, "$(EGU=mm)") field(PREC, "$(PREC=4)") field(VAL, "$(DBND)") info(autosaveFields, "VAL") } record(calcout, "$(P):$(POS)CalcState"){ field(DESC, "Calculate if at $(POS) position") field(INPA, "$(P):$(POS)Position CP") field(INPB, "$(P):MOTR.RBV CP") field(INPC, "$(P):$(POS)Deadband") field(CALC, "ABS(A-B)