From d1fc85c3476e9ccbfff14a3e35f973aabe382f91 Mon Sep 17 00:00:00 2001 From: DW Date: Thu, 13 Jun 2024 18:54:23 +0200 Subject: [PATCH 1/2] fix: avoid two PpsInp records are set at the same time --- evgMrmApp/Db/evgMrm.db | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/evgMrmApp/Db/evgMrm.db b/evgMrmApp/Db/evgMrm.db index 28838001..e9c106d7 100644 --- a/evgMrmApp/Db/evgMrm.db +++ b/evgMrmApp/Db/evgMrm.db @@ -145,10 +145,19 @@ record(mbbo, "$(P)PpsInp-Sel") { field(FFVL, "0x2000") field(UNSV, "INVALID") field(IVOA, "Don't drive outputs") - field(FLNK, "$(P)PpsInp-MbbiDir_") + field(FLNK, "$(P)PpsInp-CO_") info(autosaveFields_pass0, "VAL") } - +record(calcout, "$(P)PpsInp-CO_") { + field(ASG, "private") + field(INPA, "$(P)PpsInp-Sel NPP") + field(CALC, "A") + field(OOPT, "When Non-zero") + field(DOPT, "Use OCAL") + field(OCAL, "0") # when PpsInp-Sel is not 0, set PpsInp1-Sel to 0 + field(OUT , "$(P)PpsInp1-Sel PP") + field(FLNK, "$(P)PpsInp-MbbiDir_") +} # # Each bit of the PpsInp-MbbiDir record is used to toggle the external input # interrupt of the corresponding external input. @@ -188,10 +197,19 @@ record(mbbo, "$(P)PpsInp1-Sel") { field(FFSV, "INVALID") field(UNSV, "INVALID") field(IVOA, "Don't drive outputs") - field(FLNK, "$(P)PpsInp1-MbbiDir_") + field(FLNK, "$(P)PpsInp1-CO_") info(autosaveFields_pass0, "VAL") } - +record(calcout, "$(P)PpsInp1-CO_") { + field(ASG, "private") + field(INPA, "$(P)PpsInp1-Sel NPP") + field(CALC, "A") + field(OOPT, "When Non-zero") + field(DOPT, "Use OCAL") + field(OCAL, "0") # when PpsInp1-Sel is not 0, set PpsInp-Sel to 0 + field(OUT , "$(P)PpsInp-Sel PP") + field(FLNK, "$(P)PpsInp1-MbbiDir_") +} # # Each bit of the PpsInp-MbbiDir record is used to toggle the external input # interrupt of the corresponding external input. From 2e9684a96d6ee8e97684266b446e950db0e495e4 Mon Sep 17 00:00:00 2001 From: DW Date: Thu, 13 Jun 2024 21:58:54 +0200 Subject: [PATCH 2/2] fix: support 3 or more PpsInp sources --- evgMrmApp/Db/evgMrm.db | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/evgMrmApp/Db/evgMrm.db b/evgMrmApp/Db/evgMrm.db index e9c106d7..d65ba396 100644 --- a/evgMrmApp/Db/evgMrm.db +++ b/evgMrmApp/Db/evgMrm.db @@ -154,8 +154,13 @@ record(calcout, "$(P)PpsInp-CO_") { field(CALC, "A") field(OOPT, "When Non-zero") field(DOPT, "Use OCAL") - field(OCAL, "0") # when PpsInp-Sel is not 0, set PpsInp1-Sel to 0 - field(OUT , "$(P)PpsInp1-Sel PP") + field(OCAL, "0") # when PpsInp-Sel is not 0, set other PpsInp to 0 + field(OUT , "$(P)PpsInp-DFO_ PP") +} +record(dfanout, "$(P)PpsInp-DFO_"){ + field(SELM, "All") + field(OUTA, "$(P)PpsInp1-Sel PP") + #field(OUTB, "$(P)PpsInp2-Sel PP") field(FLNK, "$(P)PpsInp-MbbiDir_") } # @@ -206,8 +211,13 @@ record(calcout, "$(P)PpsInp1-CO_") { field(CALC, "A") field(OOPT, "When Non-zero") field(DOPT, "Use OCAL") - field(OCAL, "0") # when PpsInp1-Sel is not 0, set PpsInp-Sel to 0 - field(OUT , "$(P)PpsInp-Sel PP") + field(OCAL, "0") # when PpsInp-Sel is not 0, set other PpsInp to 0 + field(OUT , "$(P)PpsInp1-DFO_ PP") +} +record(dfanout, "$(P)PpsInp1-DFO_"){ + field(SELM, "All") + field(OUTA, "$(P)PpsInp-Sel PP") + #field(OUTB, "$(P)PpsInp2-Sel PP") field(FLNK, "$(P)PpsInp1-MbbiDir_") } #