makes the low_rate bit polarity configurable
Example Action / Lint (push) Successful in 3s
Example Action / BuildAndTest (push) Successful in 37s

This commit is contained in:
2026-04-20 14:45:59 +02:00
parent 871ee8a2e2
commit 577d4dca88
8 changed files with 25 additions and 24 deletions
+15
View File
@@ -25,6 +25,15 @@ older EL737 Counterboxes. Specifically,
Furthermore, the 2nd Generation DAQ's have 10 input channels, in place of the 8
or 4 channels on the older EL737 Counterboxes.
## Breaking Changes
* From version `0.5.0`, all device startup scripts assume that a low rate is
communicated by bit 2 of the status being set to 1. Beforehand, when using
daq\_2nd\_gen.cmd, the default was 0. So if you are using this script, you
might need to now additionally set the variable **RATE_OKAY_BIT** to 1, to
correct for this change, if you see a low rate warning in Nicos, when the
rate is above the configured threshold.
## How to Use
Unless a custom database is needed, a device can be configure simply by setting
@@ -40,6 +49,12 @@ Required Variables
| DAQ\_IP | Network IP of device |
| DAQ\_PORT | Network Port of device |
Optional Variables
| Environment Variable | Purpose |
|----------------------|-----------------------------------------------------------------------------|
| RATE\_OKAY\_BIT | Some DAQs invert the rate bit. Set to 1 to correct inversion, default is 0. |
All PVs take the form
```
-7
View File
@@ -38,13 +38,6 @@ record(seq, "$(INSTR)$(NAME):CORRECT-MONITOR-CHANNEL")
field(SCAN, ".5 second")
}
record(calc, "$(INSTR)$(NAME):RATE_MAP")
{
field(DESC, "Want a consistent lowrate pv")
field(INPA, "$(INSTR)$(NAME):RAW-STATUS.B2 NPP MS")
field(CALC, "(A=1)?0:1")
}
################################################################################
# Count Commands
-7
View File
@@ -25,13 +25,6 @@ record(longin, "$(INSTR)$(NAME):MONITOR-CHANNEL_RBV")
field(DISP, 1)
}
record(calc, "$(INSTR)$(NAME):RATE_MAP")
{
field(DESC, "Want a consistent lowrate pv")
field(INPA, "$(INSTR)$(NAME):RAW-STATUS.B2 NPP MS")
field(CALC, "(A=0)?0:1")
}
################################################################################
# Count Commands
-7
View File
@@ -25,13 +25,6 @@ record(longin, "$(INSTR)$(NAME):MONITOR-CHANNEL_RBV")
field(DISP, 1)
}
record(calc, "$(INSTR)$(NAME):RATE_MAP")
{
field(DESC, "Want a consistent lowrate pv")
field(INPA, "$(INSTR)$(NAME):RAW-STATUS.B2 NPP MS")
field(CALC, "(A=0)?0:1")
}
################################################################################
# Count Commands
+7
View File
@@ -86,6 +86,13 @@ record(bi, "$(INSTR)$(NAME):COUNTING_PRESET")
field(ONAM, "COUNTING")
}
record(calc, "$(INSTR)$(NAME):RATE_MAP")
{
field(DESC, "This bit is not consistent across DAQs")
field(INPA, "$(INSTR)$(NAME):RAW-STATUS.B2 NPP MS")
field(CALC, "(A=$(RATE_OKAY_BIT))?0:1")
}
record(bi, "$(INSTR)$(NAME):IS_LOWRATE")
{
field(INP, "$(INSTR)$(NAME):RATE_MAP PP MS")
+1 -1
View File
@@ -12,7 +12,7 @@ $(SET_SIM_MODE=#) $(SET_SIM_MODE) sleep 3
epicsEnvSet("PROTO", "$(sinqDAQ_DB)daq.proto")
drvAsynIPPortConfigure("ASYN_$(NAME)", "$($(NAME)_DAQ_HOST)", 0, 0, 0)
dbLoadRecords("$(sinqDAQ_DB)daq_common.db", "INSTR=$(INSTR), NAME=$(NAME), PROTO=$(PROTO), ASYN_PORT=ASYN_$(NAME), CHANNELS=10")
dbLoadRecords("$(sinqDAQ_DB)daq_common.db", "INSTR=$(INSTR), NAME=$(NAME), PROTO=$(PROTO), ASYN_PORT=ASYN_$(NAME), CHANNELS=10, RATE_OKAY_BIT=$(RATE_OKAY_BIT=0)")
dbLoadRecords("$(sinqDAQ_DB)daq_2nd_gen.db", "INSTR=$(INSTR), NAME=$(NAME), PROTO=$(PROTO), ASYN_PORT=ASYN_$(NAME), CHANNELS=10")
# Could also use substitions instead.
+1 -1
View File
@@ -12,7 +12,7 @@ $(SET_SIM_MODE=#) $(SET_SIM_MODE) sleep 3
epicsEnvSet("PROTO", "$(sinqDAQ_DB)daq.proto")
drvAsynIPPortConfigure("ASYN_$(NAME)", "$($(NAME)_DAQ_HOST)", 0, 0, 0)
dbLoadRecords("$(sinqDAQ_DB)daq_common.db", "INSTR=$(INSTR), NAME=$(NAME), PROTO=$(PROTO), ASYN_PORT=ASYN_$(NAME), CHANNELS=4")
dbLoadRecords("$(sinqDAQ_DB)daq_common.db", "INSTR=$(INSTR), NAME=$(NAME), PROTO=$(PROTO), ASYN_PORT=ASYN_$(NAME), CHANNELS=4, RATE_OKAY_BIT=$(RATE_OKAY_BIT=0)")
dbLoadRecords("$(sinqDAQ_DB)daq_4ch.db", "INSTR=$(INSTR), NAME=$(NAME), PROTO=$(PROTO), ASYN_PORT=ASYN_$(NAME)")
# Could also use substitions instead.
+1 -1
View File
@@ -12,7 +12,7 @@ $(SET_SIM_MODE=#) $(SET_SIM_MODE) sleep 3
epicsEnvSet("PROTO", "$(sinqDAQ_DB)daq.proto")
drvAsynIPPortConfigure("ASYN_$(NAME)", "$($(NAME)_DAQ_HOST)", 0, 0, 0)
dbLoadRecords("$(sinqDAQ_DB)daq_common.db", "INSTR=$(INSTR), NAME=$(NAME), PROTO=$(PROTO), ASYN_PORT=ASYN_$(NAME), CHANNELS=8")
dbLoadRecords("$(sinqDAQ_DB)daq_common.db", "INSTR=$(INSTR), NAME=$(NAME), PROTO=$(PROTO), ASYN_PORT=ASYN_$(NAME), CHANNELS=8, RATE_OKAY_BIT=$(RATE_OKAY_BIT=0)")
dbLoadRecords("$(sinqDAQ_DB)daq_8ch.db", "INSTR=$(INSTR), NAME=$(NAME), PROTO=$(PROTO), ASYN_PORT=ASYN_$(NAME)")
# Could also use substitions instead.