From e5f077ba5aecd85ec1b65e5d2b00c287cabc9699 Mon Sep 17 00:00:00 2001 From: rivers Date: Fri, 27 Mar 2009 17:57:13 +0000 Subject: [PATCH] Fixed problem with logic in initial value of FileNumber; this had broken when fixing asyn device support git-svn-id: https://subversion.xor.aps.anl.gov/synApps/areaDetector/trunk@8692 dc6c5ff5-0b8b-c028-a01f-ffb33f00fc8b --- ADApp/Db/NDFile.template | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ADApp/Db/NDFile.template b/ADApp/Db/NDFile.template index 5b73fe3..d16cfdf 100644 --- a/ADApp/Db/NDFile.template +++ b/ADApp/Db/NDFile.template @@ -57,7 +57,9 @@ record(longout, "$(P)$(R)FileNumber") record(longin, "$(P)$(R)FileNumber_RBV") { - field(PINI, "1") + # This record cannot be PINI=YES because then it will cause the _Sync record below to process, + # outputting the initial value of the _RBV record. + #field(PINI, "1") field(DTYP, "asynInt32") field(INP, "@asyn($(PORT),$(ADDR),$(TIMEOUT))FILE_NUMBER") field(SCAN, "I/O Intr") @@ -65,6 +67,10 @@ record(longin, "$(P)$(R)FileNumber_RBV") record(calcout, "$(P)$(R)FileNumber_Sync") { + # This record must not process until the _RBV is no longer in SEVR=UDF, i.e. + # after the first time that record processes due to a callback from the driver. + field(SDIS, "$(P)$(R)FileNumber_RBV.SEVR") + field(DISV, "3") field(INPA, "$(P)$(R)FileNumber_RBV CP") field(CALC, "A") field(OUT, "$(P)$(R)FileNumber PP")