change counts to 64 bit integer, improve broken packet check, correct order of updating status
This commit is contained in:
@@ -52,15 +52,14 @@ record(longout, "$(INSTR)$(NAME):C$(CHANNEL)")
|
||||
################################################################################
|
||||
# Read all monitors values
|
||||
|
||||
record(longin, "$(INSTR)$(NAME):M$(CHANNEL)")
|
||||
record(int64in, "$(INSTR)$(NAME):M$(CHANNEL)")
|
||||
{
|
||||
field(DESC, "DAQ CH$(CHANNEL)")
|
||||
field(EGU, "cts")
|
||||
field(DTYP, "asynInt32")
|
||||
field(DTYP, "asynInt64")
|
||||
field(INP, "@asyn($(PORT),0,$(TIMEOUT=1)) COUNTS$(CHANNEL)")
|
||||
# This is probably too fast. We could trigger things the same as sinqDAQ to ensure the db is update in the same order
|
||||
# field(SCAN, "I/O Intr")
|
||||
field(SCAN, ".2 second")
|
||||
field(PINI, "YES")
|
||||
}
|
||||
|
||||
|
||||
@@ -15,14 +15,13 @@ record(longout, "$(INSTR)$(NAME):FULL-RESET")
|
||||
################################################################################
|
||||
# Status Variables
|
||||
|
||||
# record(stringin, "$(INSTR)$(NAME):MsgTxt")
|
||||
# {
|
||||
# field(DESC, "Unexpected received response")
|
||||
# field(DTYP, "devDAQStringError")
|
||||
# field(FLNK, "$(INSTR)$(NAME):INVALID-CONFIG")
|
||||
# }
|
||||
|
||||
record(mbbi, "$(INSTR)$(NAME):STATUS")
|
||||
# We separate the RAW-STATUS and the STATUS PV so that the state can be updated
|
||||
# in a sequence, that guarantees that we included the most recent time and
|
||||
# counts before the status switches back to Idle.
|
||||
# We do this via a sequenced update
|
||||
#
|
||||
# RAW-STATUS -> ELAPSED-SECONDS -> M* -> STATUS
|
||||
record(mbbi, "$(INSTR)$(NAME):RAW-STATUS")
|
||||
{
|
||||
field(DESC, "DAQ Status")
|
||||
field(DTYP, "asynInt32")
|
||||
@@ -40,7 +39,41 @@ record(mbbi, "$(INSTR)$(NAME):STATUS")
|
||||
field(FRST, "INVALID")
|
||||
# This is probably too fast. We could trigger things the same as sinqDAQ to ensure the db is update in the same order
|
||||
#field(SCAN, "I/O Intr")
|
||||
field(SCAN, ".5 second")
|
||||
field(SCAN, ".2 second")
|
||||
field(FLNK, "$(INSTR)$(NAME):READALL")
|
||||
field(PINI, "YES")
|
||||
}
|
||||
|
||||
record(fanout, "$(INSTR)$(NAME):READALL")
|
||||
{
|
||||
field(SELM, "All")
|
||||
field(LNK0, "$(INSTR)$(NAME):ELAPSED-TIME PP")
|
||||
field(LNK1, "$(INSTR)$(NAME):M0")
|
||||
field(LNK2, "$(INSTR)$(NAME):M1")
|
||||
field(LNK3, "$(INSTR)$(NAME):M2")
|
||||
field(LNK4, "$(INSTR)$(NAME):M3")
|
||||
field(LNK5, "$(INSTR)$(NAME):M4")
|
||||
# Doesn't seemt o be a problem to have more in here :D
|
||||
# field(LNK6, "$(INSTR)$(NAME):M5")
|
||||
# field(LNK7, "$(INSTR)$(NAME):M6")
|
||||
field(FLNK, "$(INSTR)$(NAME):STATUS")
|
||||
}
|
||||
|
||||
record(mbbi, "$(INSTR)$(NAME):STATUS")
|
||||
{
|
||||
field(INP, "$(INSTR)$(NAME):RAW-STATUS NPP")
|
||||
field(DESC, "DAQ Status")
|
||||
field(ZRVL, "0")
|
||||
field(ZRST, "Idle")
|
||||
field(ONVL, "1")
|
||||
field(ONST, "Counting")
|
||||
field(TWVL, "2")
|
||||
field(TWST, "Low rate")
|
||||
field(THVL, "3")
|
||||
field(THST, "Paused")
|
||||
# 4 should never happen, if it does it means the DAQ reports undocumented statusbits
|
||||
field(FRVL, "4")
|
||||
field(FRST, "INVALID")
|
||||
field(PINI, "YES")
|
||||
}
|
||||
|
||||
@@ -196,14 +229,13 @@ record(longout, "$(INSTR)$(NAME):CT")
|
||||
################################################################################
|
||||
# Read all monitors values
|
||||
|
||||
record(ai,"$(INSTR)$(NAME):ELAPSED-TIME")
|
||||
record(ai, "$(INSTR)$(NAME):ELAPSED-TIME")
|
||||
{
|
||||
field(DESC, "DAQ Measured Time")
|
||||
field(EGU, "sec")
|
||||
field(DTYP, "asynFloat64")
|
||||
field(INP, "@asyn($(PORT),0,$(TIMEOUT=1)) TIME")
|
||||
# field(SCAN, "I/O Intr")
|
||||
field(SCAN, ".5 second")
|
||||
field(PINI, "YES")
|
||||
# field(FLNK, "$(INSTR)$(NAME):ETO")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user