89 lines
2.4 KiB
Plaintext
89 lines
2.4 KiB
Plaintext
# EL737 EPICS Database for streamdevice support
|
|
# Macros
|
|
# P - Prefix
|
|
# NAME - just a name, e.g. DAQV2
|
|
# PROTO - Stream device protocol file
|
|
# ASYN_PORT - Low level Asyn IP Port to Counterbox
|
|
|
|
################################################################################
|
|
# Status Variables
|
|
|
|
record(longout, "$(P):$(NAME):MONITOR-CHANNEL")
|
|
{
|
|
field(DESC, "PRESET-COUNT Monitors this channel")
|
|
field(DTYP, "stream")
|
|
field(OUT, "@$(PROTO) writePresetMonitor($(P):$(NAME):) $(ASYN_PORT)")
|
|
field(FLNK, "$(P):$(NAME):MONITOR-CHANNEL_RBV")
|
|
}
|
|
|
|
record(longin, "$(P):$(NAME):MONITOR-CHANNEL_RBV")
|
|
{
|
|
field(DESC, "PRESET-COUNT Monitors this channel")
|
|
field(DTYP, "stream")
|
|
field(INP, "@$(PROTO) readPresetMonitor($(P):$(NAME):) $(ASYN_PORT)")
|
|
field(SCAN, "5 second")
|
|
}
|
|
|
|
################################################################################
|
|
# Count Commands
|
|
|
|
record(longout,"$(P):$(NAME):THRESHOLD-MONITOR")
|
|
{
|
|
field(DESC, "Channel monitored for minimum rate")
|
|
field(VAL, "1") # Monitor
|
|
field(DRVL, "1") # Smallest Threshold Channel
|
|
field(DRVL, "10") # Largest Threshold Channel
|
|
}
|
|
|
|
################################################################################
|
|
# Read all monitors values
|
|
|
|
record(ai, "$(P):$(NAME):READALL")
|
|
{
|
|
field(DESC, "Reads monitors and elapsed time")
|
|
field(INP, "@$(PROTO) readAll10($(P):$(NAME):) $(ASYN_PORT)")
|
|
field(SCAN, ".2 second")
|
|
field(DTYP, "stream")
|
|
field(FLNK, "$(P):$(NAME):UNSET-COUNTING")
|
|
}
|
|
|
|
record(longin, "$(P):$(NAME):M9")
|
|
{
|
|
field(DESC, "Counterbox CH9")
|
|
}
|
|
|
|
record(longin, "$(P):$(NAME):M10")
|
|
{
|
|
field(DESC, "Counterbox CH10")
|
|
}
|
|
|
|
################################################################################
|
|
# Testing Commands
|
|
|
|
# These won't match the values on the machine after a full restart But I chose
|
|
# not to force their intialisation as they are only important for testing
|
|
|
|
record(bo, "$(P):$(NAME):TESTGEN")
|
|
{
|
|
field(DESC, "Turn on/off Testgen Signal")
|
|
field(DTYP, "stream")
|
|
field(OUT, "@$(PROTO) switchTestgenOnOff($(P):$(NAME):) $(ASYN_PORT)")
|
|
field(VAL, 0)
|
|
}
|
|
|
|
record(longout, "$(P):$(NAME):TESTGEN-LOWRATE")
|
|
{
|
|
field(DESC, "Set Minimum Testgen Rate")
|
|
field(DTYP, "stream")
|
|
field(OUT, "@$(PROTO) setTestSignal($(P):$(NAME):) $(ASYN_PORT)")
|
|
field(VAL, 1000)
|
|
}
|
|
|
|
record(longout, "$(P):$(NAME):TESTGEN-HIGHRATE")
|
|
{
|
|
field(DESC, "Set Maximum Testgen Rate")
|
|
field(DTYP, "stream")
|
|
field(OUT, "@$(PROTO) setTestSignal($(P):$(NAME):) $(ASYN_PORT)")
|
|
field(VAL, 1000)
|
|
}
|