make it run

This commit is contained in:
2026-01-19 11:13:00 +01:00
parent 45b01bf4c4
commit 94402c4592
3 changed files with 9 additions and 9 deletions

View File

@@ -65,7 +65,7 @@ record(longout, "$(INSTR)$(NAME):PRESET-COUNT-TRIG")
# Signal count preset as command # Signal count preset as command
field(VAL, 1) field(VAL, 1)
field(OUT, "$(INSTR)$(NAME):COMMAND-TRIG PP") field(OUT, "$(INSTR)$(NAME):COMMAND-TRIG PP")
field(FLNK, "$(INSTR)$(NAME):COUNT-TYPE" field(FLNK, "$(INSTR)$(NAME):COUNT-TYPE")
} }
record(calcout, "$(INSTR)$(NAME):PRESET-TIME") record(calcout, "$(INSTR)$(NAME):PRESET-TIME")
@@ -79,14 +79,13 @@ record(calcout, "$(INSTR)$(NAME):PRESET-TIME")
field(OOPT, "Every Time") field(OOPT, "Every Time")
field(DOPT, "Use OCAL") field(DOPT, "Use OCAL")
field(OUT, "$(INSTR)$(NAME):COMMAND-TRIG PP") field(OUT, "$(INSTR)$(NAME):COMMAND-TRIG PP")
field(FLNK, "$(INSTR)$(NAME):COUNT-TYPE" field(FLNK, "$(INSTR)$(NAME):COUNT-TYPE")
} }
record(calcout, "$(INSTR)$(NAME):PAUSE") record(calcout, "$(INSTR)$(NAME):PAUSE")
{ {
field(DESC, "Pause the current count") field(DESC, "Pause the current count")
field(VAL, 0) field(VAL, 0)
field(FLNK, "$(INSTR)$(NAME):RAW-STATUS")
field(OCAL, 3) field(OCAL, 3)
field(OOPT, "Every Time") field(OOPT, "Every Time")
field(DOPT, "Use OCAL") field(DOPT, "Use OCAL")
@@ -97,7 +96,6 @@ record(calcout, "$(INSTR)$(NAME):CONTINUE")
{ {
field(DESC, "Continue with a count that was paused") field(DESC, "Continue with a count that was paused")
field(VAL, "0") field(VAL, "0")
field(FLNK, "$(INSTR)$(NAME):RAW-STATUS")
field(OCAL, 4) field(OCAL, 4)
field(OOPT, "Every Time") field(OOPT, "Every Time")
field(DOPT, "Use OCAL") field(DOPT, "Use OCAL")
@@ -183,8 +181,8 @@ record(aSub, "$(INSTR)$(NAME):EMULATION")
{ {
# Scan rate determines how often we sample the rate # Scan rate determines how often we sample the rate
# and how often the counter value updates. # and how often the counter value updates.
field(SCAN, "0.1 seconds" field(SCAN, ".1 second")
field(SNAM, "processEmulatedCounter" field(SNAM, "processEmulatedCounter")
# The first 4 inputs are also mapped as the first 4 outputs # The first 4 inputs are also mapped as the first 4 outputs
field(INPA, "$(INSTR)$(NAME):STATUS") field(INPA, "$(INSTR)$(NAME):STATUS")
@@ -243,7 +241,7 @@ record(calc, "$(INSTR)$(NAME):R0")
{ {
field(DESC, "Rate of DAQ CH0 proton current") field(DESC, "Rate of DAQ CH0 proton current")
#field(INPA, "$(REMOTE_RATE_PV) CA") #field(INPA, "$(REMOTE_RATE_PV) CA")
field(INPA, "$(INSTR)$(NAME):PROTON_CURR)" field(INPA, "$(INSTR)$(NAME):PROTON_CURR")
field(INPB, "$(SHUTTER1_PV=0)") field(INPB, "$(SHUTTER1_PV=0)")
field(INPC, "$(SHUTTER1_CLOSED_VAL=1)") field(INPC, "$(SHUTTER1_CLOSED_VAL=1)")
field(INPD, "$(SHUTTER2_PV=0)") field(INPD, "$(SHUTTER2_PV=0)")
@@ -266,7 +264,7 @@ record(calcout, "$(INSTR)$(NAME):C0")
field(OOPT, "Every Time") field(OOPT, "Every Time")
field(DOPT, "Use OCAL") field(DOPT, "Use OCAL")
field(OCAL, "0") field(OCAL, "0")
field(OUT, "$(INSTR)$(NAME):M0 PP" field(OUT, "$(INSTR)$(NAME):M0 PP")
} }
# Current Status of Channel, i.e. is it ready to count? # Current Status of Channel, i.e. is it ready to count?
@@ -280,7 +278,7 @@ record(bi, "$(INSTR)$(NAME):S0")
} }
record(calc, "$(INSTR)$(NAME):PROTON_CURR") { record(calc, "$(INSTR)$(NAME):PROTON_CURR") {
field(SCAN, "0.05 seconds") field(SCAN, ".1 second")
field(CALC, "1500 * 101 * SIN(A)") field(CALC, "1500 * 101 * SIN(A)")
field(INPA, "$(INSTR)$(NAME):PROTON_CURR_VAR PP") field(INPA, "$(INSTR)$(NAME):PROTON_CURR_VAR PP")
} }

View File

@@ -3,3 +3,4 @@
#--------------------------------------------- #---------------------------------------------
device(stringin, INST_IO, devDAQStringError, "devDAQStringError") device(stringin, INST_IO, devDAQStringError, "devDAQStringError")
function(processEmulatedCounter)

View File

@@ -270,4 +270,5 @@ static long processEmulatedCounter(struct aSubRecord *psub)
return 0; return 0;
} }
/* Register these symbols for use by IOC code: */
epicsRegisterFunction(processEmulatedCounter); epicsRegisterFunction(processEmulatedCounter);