SINQSW-107 makes some changes to better cooperate with Nicos
This commit is contained in:
@ -11,6 +11,25 @@
|
||||
################################################################################
|
||||
# Count Commands
|
||||
|
||||
# record(ao,"$(P):$(NAME):THRESHOLD_$(CHANNEL)")
|
||||
# {
|
||||
# field(DESC, "Minimum rate for counting to proceed")
|
||||
# field(VAL, "0") # Rate
|
||||
# field(DRVL, "0") # Minimum Rate
|
||||
# field(OMSL, "supervisory")
|
||||
# field(OROC, "0")
|
||||
# field(OUT, "@$(PROTO) setMinRate($(P):$(NAME):, $(CHANNEL)) $(ASYN_PORT)")
|
||||
# field(DTYP, "stream")
|
||||
# }
|
||||
#
|
||||
# record(ai,"$(P):$(NAME):THRESHOLD_$(CHANNEL)_RBV")
|
||||
# {
|
||||
# field(DESC, "Minimum rate for counting to proceed")
|
||||
# field(INP, "@$(PROTO) readMinRate($(P):$(NAME):, $(CHANNEL)) $(ASYN_PORT)")
|
||||
# field(DTYP, "stream")
|
||||
# field(SCAN, "1 second")
|
||||
# }
|
||||
|
||||
################################################################################
|
||||
# Read all monitors values
|
||||
|
||||
@ -18,3 +37,11 @@ record(longin, "$(P):$(NAME):M$(CHANNEL)")
|
||||
{
|
||||
field(DESC, "Counterbox CH$(CHANNEL)")
|
||||
}
|
||||
|
||||
record(ai, "$(P):$(NAME):R$(CHANNEL)")
|
||||
{
|
||||
field(DESC, "Counterbox Rate CH$(CHANNEL)")
|
||||
field(INP, "@$(PROTO) readRate($(P):$(NAME):, $(CHANNEL)) $(ASYN_PORT)")
|
||||
field(DTYP, "stream")
|
||||
field(SCAN, "1 second")
|
||||
}
|
||||
|
@ -76,19 +76,39 @@ stopCount {
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
# setMinRate{
|
||||
# out "DL \$2 %.3f";
|
||||
# in;
|
||||
# @mismatch{in "%(\$1MsgTxt)s";}
|
||||
# }
|
||||
#
|
||||
# readMinRate{
|
||||
# out "DL \$2";
|
||||
# in "%f";
|
||||
# @mismatch{in "%(\$1MsgTxt)s";}
|
||||
# }
|
||||
|
||||
setMinRate{
|
||||
out "DL %(\$1THRESHOLD-MONITOR)d %(\$1THRESHOLD)d";
|
||||
in;
|
||||
out "DR %(\$1THRESHOLD-MONITOR)d";
|
||||
out "DL %(\$1THRESHOLD-MONITOR_RBV)d %.3f";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
readMinRate{
|
||||
out "DR";
|
||||
in "%(\$1THRESHOLD-MONITOR_RBV)d";
|
||||
out "DL %(\$1THRESHOLD-MONITOR_RBV)d";
|
||||
in "%(\$1THRESHOLD_RBV)d";
|
||||
in "%f";
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
setRateMonitor{
|
||||
out "DR %d";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
readRateMonitor{
|
||||
out "DR";
|
||||
in "%d";
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
@ -115,7 +135,7 @@ readAll10 {
|
||||
|
||||
readRate {
|
||||
out "RR \$2";
|
||||
in "%(\$1R\$2)f";
|
||||
in "%f";
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
|
@ -8,10 +8,12 @@
|
||||
################################################################################
|
||||
# Status Variables
|
||||
|
||||
record(longin, "$(P):$(NAME):MONITOR-CHANNEL")
|
||||
record(longout, "$(P):$(NAME):MONITOR-CHANNEL")
|
||||
{
|
||||
field(DESC, "PRESET-COUNT Monitors this channel")
|
||||
field(VAL, 1)
|
||||
field(DRVL, "1") # Smallest Monitor Channel
|
||||
field(DRVH, "1") # Largest Monitor Channel
|
||||
field(DISP, 1)
|
||||
}
|
||||
|
||||
|
@ -8,10 +8,12 @@
|
||||
################################################################################
|
||||
# Status Variables
|
||||
|
||||
record(longin, "$(P):$(NAME):MONITOR-CHANNEL")
|
||||
record(longout, "$(P):$(NAME):MONITOR-CHANNEL")
|
||||
{
|
||||
field(DESC, "PRESET-COUNT Monitors this channel")
|
||||
field(VAL, 1)
|
||||
field(DRVL, "1") # Smallest Monitor Channel
|
||||
field(DRVH, "1") # Largest Monitor Channel
|
||||
field(DISP, 1)
|
||||
}
|
||||
|
||||
|
@ -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")
|
||||
# }
|
||||
|
@ -11,6 +11,8 @@
|
||||
record(longout, "$(P):$(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($(P):$(NAME):) $(ASYN_PORT)")
|
||||
field(FLNK, "$(P):$(NAME):MONITOR-CHANNEL_RBV")
|
||||
|
Reference in New Issue
Block a user