use the INSTR environment variable instead of PREFIX

This commit is contained in:
2025-04-29 15:58:32 +02:00
parent d4b111ce6d
commit d81105551d
13 changed files with 202 additions and 184 deletions

View File

@ -1,9 +1,11 @@
# EL737 EPICS Database for streamdevice support
# EPICS Database for streamdevice specific to measurement channels
#
# Macros
# P - Prefix
# NAME - just a name, e.g. EL737
# INSTR - Prefix
# NAME - the device name, e.g. EL737
# PROTO - Stream device protocol file
# ASYN_PORT - Low level Asyn IP Port to EL737
# ASYN_PORT - Low level Asyn IP Port to Counterbox
# CHANNEL - the number associated with the measurment channel
################################################################################
# Status Variables
@ -11,25 +13,25 @@
################################################################################
# Count Commands
record(bo, "$(P):$(NAME):C$(CHANNEL)")
record(bo, "$(INSTR)$(NAME):C$(CHANNEL)")
{
field(DESC, "Clear the current channel count")
field(DTYP, "stream")
field(OUT, "@$(PROTO) clearChannel($(P):$(NAME):, $(CHANNEL)) $(ASYN_PORT)")
field(OUT, "@$(PROTO) clearChannel($(INSTR)$(NAME):, $(CHANNEL)) $(ASYN_PORT)")
}
################################################################################
# Read all monitors values
record(longin, "$(P):$(NAME):M$(CHANNEL)")
record(longin, "$(INSTR)$(NAME):M$(CHANNEL)")
{
field(DESC, "Counterbox CH$(CHANNEL)")
}
record(ai, "$(P):$(NAME):R$(CHANNEL)")
record(ai, "$(INSTR)$(NAME):R$(CHANNEL)")
{
field(DESC, "Counterbox Rate CH$(CHANNEL)")
field(INP, "@$(PROTO) readRate($(P):$(NAME):, $(CHANNEL)) $(ASYN_PORT)")
field(INP, "@$(PROTO) readRate($(INSTR)$(NAME):, $(CHANNEL)) $(ASYN_PORT)")
field(DTYP, "stream")
field(SCAN, "1 second")
}