# % macro, __doc__, Simple template that reads and writes to a variable on a # PMAC or geoBrick via dynamic parameters. # % macro, P, Pv Prefix # % macro, Q, Pv Suffix # % macro, PORT, Motor controller serial port # % macro, VAR, Variable on PMAC to write to, e.g. P700 # % macro, EGU, Engineering units # % macro, VARIABLE_PREC, Variable Record precision ########################################## # Records for writing to PMAC variables ########################################## record(ai, "$(P)$(Q):RBV") { field(SCAN, "I/O Intr") field(PINI, "NO") field(DTYP, "asynFloat64") field(INP, "@asyn($(PORT),0)PMAC_VDM_$(VAR)") field(PREC, "$(VARIABLE_PREC)") field(EGU, "$(EGU)") } record(calcout, "$(P)$(Q):SYNC") { field(DESC, "sync demand with readback") field(CALC, "A") field(OUT, "$(P)$(Q) PP") field(INPA, "$(P)$(Q):RBV") } # % archiver 1 monitor record(ao, "$(P)$(Q)") { field(DESC, "demand") field(EGU, "$(EGU)") field(PREC, "$(VARIABLE_PREC)") field(OUT, "$(P)$(Q):SET PP") } record(ao, "$(P)$(Q):SET") { field(DESC, "Write value to pmac") field(DTYP, "asynFloat64") field(SDIS, "$(P)$(Q):SYNC.PACT") field(OUT, "@asyn($(PORT),0)PMAC_VDM_$(VAR)") }