SINQSW-107 makes some changes to better cooperate with Nicos

This commit is contained in:
2024-11-13 12:29:24 +01:00
parent 01839b3217
commit 3b660ca560
9 changed files with 101 additions and 64 deletions

View File

@@ -12,19 +12,6 @@ record(bo, "$(P):$(NAME):INIT-CONF")
field(OUT, "@$(PROTO) initialise($(P):$(NAME):) $(ASYN_PORT)")
field(PINI, "YES") # Run at init
field(DTYP, "stream")
field(FLNK, "$(P):$(NAME):INIT-BOX")
}
# As we aren't certain of the order that PINI exectutes PVs, we only set it to
# true on INIT-CONF to make sure the box is ready to receive commands, and then
# let INIT-CONF trigger the initialisation of other necessary records
record(fanout, "$(P):$(NAME):INIT-BOX")
{
field(DESC, "Rewrite PVs to Box")
field(SELM, "All")
field(LNK0, "$(P):$(NAME):MONITOR-CHANNEL_RBV PP")
field(LNK1, "$(P):$(NAME):RAW-STATUS PP")
field(LNK2, "$(P):$(NAME):THRESHOLD_RBV PP")
}
record(longout, "$(P):$(NAME):FULL-RESET")
@@ -71,7 +58,7 @@ record(longin, "$(P):$(NAME):RAW-STATUS")
{
field(DESC, "Raw returned status value")
field(DTYP, "stream")
field(SCAN, ".1 second")
field(SCAN, ".5 second")
field(INP, "@$(PROTO) readStatus($(P):$(NAME):) $(ASYN_PORT)")
field(FLNK, "$(P):$(NAME):READALL")
}
@@ -156,23 +143,24 @@ record(bo, "$(P):$(NAME):STOP")
field(OUT, "@$(PROTO) stopCount($(P):$(NAME):) $(ASYN_PORT)")
}
# TODO should changing the monitor also set things?
# or only when actually setting a threshold?
record(longout,"$(P):$(NAME):THRESHOLD")
record(ao,"$(P):$(NAME):THRESHOLD")
{
field(DESC, "Minimum rate for counting to proceed")
field(VAL, "0") # Rate
field(DRVL, "0") # Minimum Rate
field(DTYP, "stream")
field(DRVL, "0.000001") # Minimum Rate
field(DRVH, "100000") # Maximum Rate
field(OMSL, "supervisory")
field(OROC, "0")
field(OUT, "@$(PROTO) setMinRate($(P):$(NAME):) $(ASYN_PORT)")
field(DTYP, "stream")
}
record(longin,"$(P):$(NAME):THRESHOLD_RBV")
record(ai,"$(P):$(NAME):THRESHOLD_RBV")
{
field(DESC, "Minimum rate for counting to proceed")
field(DTYP, "stream")
field(INP, "@$(PROTO) readMinRate($(P):$(NAME):) $(ASYN_PORT)")
field(SCAN, "2 second")
field(DTYP, "stream")
field(SCAN, "1 second")
}
record(longout,"$(P):$(NAME):THRESHOLD-MONITOR")
@@ -180,12 +168,17 @@ 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, "$(CHANNELS)") # Largest Threshold Channel
field(DRVH, "$(CHANNELS)") # Largest Threshold Channel
field(OUT, "@$(PROTO) setRateMonitor($(P):$(NAME):) $(ASYN_PORT)")
field(DTYP, "stream")
}
record(longin,"$(P):$(NAME):THRESHOLD-MONITOR_RBV")
{
field(DESC, "Channel monitored for minimum rate")
field(INP, "@$(PROTO) readRateMonitor($(P):$(NAME):) $(ASYN_PORT)")
field(DTYP, "stream")
field(SCAN, "1 second")
}
################################################################################
@@ -204,12 +197,3 @@ record(ai,"$(P):$(NAME):ELAPSED-TIME")
field(DESC, "Counterbox Measured Time")
field(EGU, "seconds")
}
# Not yet sure whether we want to support this
# record(longin, "$(P):$(NAME):R1")
# {
# field(DESC, "Counterbox Rate CH1")
# field(INP, "@$(PROTO) readRate($(P):$(NAME):, 1) $(ASYN_PORT)")
# field(SCAN, ".2 second")
# field(DTYP, "stream")
# }