# EPICS Database for streamdevice support for functionality specific to the 2nd # Generation Systems # # Macros # INSTR - Prefix # NAME - the device name, e.g. DAQV2 # PROTO - Stream device protocol file # ASYN_PORT - Low level Asyn IP Port to DAQ ################################################################################ # Status Variables record(longout, "$(INSTR)$(NAME):MONITOR-CHANNEL") { field(DESC, "PRESET-COUNT Monitors this channel") field(DRVL, "1") # Smallest Monitor Channel field(DRVH, "$(CHANNELS)") # Largest Monitor Channel field(DTYP, "stream") field(OUT, "@$(PROTO) writePresetMonitor($(INSTR)$(NAME):) $(ASYN_PORT)") field(FLNK, "$(INSTR)$(NAME):MONITOR-CHANNEL_RBV") } record(longin, "$(INSTR)$(NAME):MONITOR-CHANNEL_RBV") { field(DESC, "PRESET-COUNT Monitors this channel") field(DTYP, "stream") field(INP, "@$(PROTO) readPresetMonitor($(INSTR)$(NAME):) $(ASYN_PORT)") field(SCAN, "1 second") } # Force back to 1 if it is 0, as 0 has no meaning... record(seq, "$(INSTR)$(NAME):CORRECT-MONITOR-CHANNEL") { field(SELM, "Specified") field(SELL, "$(INSTR)$(NAME):MONITOR-CHANNEL_RBV.VAL NPP") field(DO0, 1) field(LNK0, "$(INSTR)$(NAME):MONITOR-CHANNEL PP") field(SCAN, ".5 second") } ################################################################################ # Count Commands # The hardware stores a separate threshold for each channel, which is somewhat # unintuitive for the user, as only one can actually be made use of at a time. # So, we just write the threshold value to all channels when it is changed. record(dfanout,"$(INSTR)$(NAME):THRESHOLD-F") { field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(INSTR)$(NAME):THRESHOLD-F1 PP") field(OUTB, "$(INSTR)$(NAME):THRESHOLD-F2 PP") } record(dfanout,"$(INSTR)$(NAME):THRESHOLD-F1") { field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(INSTR)$(NAME):THRESH1 PP") field(OUTB, "$(INSTR)$(NAME):THRESH2 PP") field(OUTC, "$(INSTR)$(NAME):THRESH3 PP") field(OUTD, "$(INSTR)$(NAME):THRESH4 PP") field(OUTE, "$(INSTR)$(NAME):THRESH5 PP") field(OUTF, "$(INSTR)$(NAME):THRESH6 PP") field(OUTG, "$(INSTR)$(NAME):THRESH7 PP") field(OUTH, "$(INSTR)$(NAME):THRESH8 PP") } record(dfanout,"$(INSTR)$(NAME):THRESHOLD-F2") { field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(INSTR)$(NAME):THRESH9 PP") field(OUTB, "$(INSTR)$(NAME):THRESH10 PP") } ################################################################################ # Read all monitors values