# Store if device is in position record(bi, "$(U):State"){ field(DESC, "Chicane usable") field(ZNAM, "Active") field(ONAM, "Locked Off") } # motor encoder offset record(ai, "$(U):EncOffset") { field(DESC, "$(MAD) Encoder offset") field(DTYP, "stream") field(INP, "@aerotech.proto getEncOff($(AXIS)) $(PORT) ") field(PINI, "YES") field(PREC, "6") field(EGU, "mm") } # Set target position when wiggler is extracted record(ao, "$(U):TargetPos") { field(DESC, "$(MAD) Target position") field(DRVH, "306.64") field(DRVL, "-1.0") field(HOPR, "306.64") field(LOPR, "-1.0") field(PREC, "4") field(EGU, "mm") info(autosaveFields, "VAL DRVL DRVH LOPR HOPR") } # Move request initiates a sequence record(bo, "$(U):TRIM") { field(DESC, "Start moving $(MAD)") field(ZNAM, "Standby") field(ONAM, "Start Move") } record(bi, "$(U):TRIMSTS") { field(DESC, "$(MAD) Trim status") field(ZNAM, "Move Done") field(ONAM, "Move Requested") } record(bi, "$(U):TRIM_DBG") { field(DESC, "$(MAD) Trim debug") field(ZNAM, "Off") field(ONAM, "On") } record(calc, "$(U):POSITIONERROR") { field(SCAN, "1 second") field(CALC, "(ABS(A - B)>1)") field(INPA, "$(U):MOTR.RBV") field(INPB, "$(U):TargetPos") }