From f7db7523563a289cdf6e013e3a8637ad87977033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Wed, 9 Aug 2023 10:43:06 -0300 Subject: [PATCH 1/3] utcaApp: build with PVXS qsrv. --- configure/RELEASE | 1 + utcaApp/src/Makefile | 3 +++ 2 files changed, 4 insertions(+) diff --git a/configure/RELEASE b/configure/RELEASE index 6bb5af2..c65037a 100644 --- a/configure/RELEASE +++ b/configure/RELEASE @@ -34,6 +34,7 @@ EPICS_BASE = $(TOP)/../epics-7 ASYN = $(EPICS_BASE)/../asyn AUTOSAVE = $(EPICS_BASE)/../autosave RETOOLS = $(EPICS_BASE)/../retools +PVXS = $(EPICS_BASE)/../pvxs # Set RULES here if you want to use build rules from somewhere # other than EPICS_BASE: diff --git a/utcaApp/src/Makefile b/utcaApp/src/Makefile index 90dc8b1..b86e7c8 100644 --- a/utcaApp/src/Makefile +++ b/utcaApp/src/Makefile @@ -56,6 +56,9 @@ utca_SRCS += utca_registerRecordDeviceDriver.cpp utca_SRCS_DEFAULT += utcaMain.cpp utca_SRCS_vxWorks += -nil- +utca_DBD += pvxsIoc.dbd +utca_LIBS += pvxsIoc pvxs + # Finally link IOC to the EPICS Base libraries utca_LIBS += $(EPICS_BASE_IOC_LIBS) From f3195f42e33d546ba637d3b2650485c93baf4d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Thu, 21 Nov 2024 09:23:49 -0300 Subject: [PATCH 2/3] pos_calc: add Monit-Mon QSRV group. This group allows atomic access to Monit rate data from a BPM: antenna readings and calculated positions, Q and sum. --- utcaApp/Db/pos_calc.template | 42 ++++++++++++++++++++++++++++++++ utcaApp/Db/pos_calc_adc.template | 5 ++++ 2 files changed, 47 insertions(+) diff --git a/utcaApp/Db/pos_calc.template b/utcaApp/Db/pos_calc.template index 51b8b05..49b429c 100644 --- a/utcaApp/Db/pos_calc.template +++ b/utcaApp/Db/pos_calc.template @@ -113,6 +113,27 @@ record(longin,"$(P)$(R)PosQOffset-RB"){ field(EGU, "nm") } +record(aai, "$(P)$(R)TableLabels-Cte"){ + field(FTVL, STRING) + field(NELM, 8) + field(INP, {const: [ + "Amplitude A", + "Amplitude B", + "Amplitude C", + "Amplitude D", + "Q", + "Sum", + "Position X", + "Position Y" + ]}) + info(Q:group, { + "$(P)$(R)Monit-Mon": { + labels: {+type: "plain", +channel: "VAL"}, + descriptor: {+type: "const", +const: "monit-rate data"} + }, + }) +} + record(longin, "$(P)$(R)AmpFIFOEvent"){ field(DTYP, "asynInt32") field(SCAN, "I/O Intr") @@ -158,24 +179,45 @@ record(ai,"$(P)$(R)PosX-Mon"){ field(DESC,"Monitoring Position X") field(EGU, "nm") field(MDEL, -1) + info(Q:group, { + "$(P)$(R)Monit-Mon": { + "value.X": {+type: "plain", +channel: "VAL"} + } + }) } record(ai,"$(P)$(R)PosY-Mon"){ field(DESC,"Monitoring Position Y") field(EGU, "nm") field(MDEL, -1) + info(Q:group, { + "$(P)$(R)Monit-Mon": { + "value.Y": {+type: "plain", +channel: "VAL"} + } + }) } record(ai,"$(P)$(R)PosQ-Mon"){ field(DESC,"Monitoring Position Q") field(EGU, "nm") field(MDEL, -1) + info(Q:group, { + "$(P)$(R)Monit-Mon": { + "value.Q": {+type: "plain", +channel: "VAL", +trigger: "*"}, + "": {+type: "meta", +channel: "VAL"} + } + }) } record(ai,"$(P)$(R)Sum-Mon"){ field(DESC,"Monitoring Sum") field(EGU, "au") field(MDEL, -1) + info(Q:group, { + "$(P)$(R)Monit-Mon": { + "value.S": {+type: "plain", +channel: "VAL"} + } + }) } record(bo,"$(P)$(R)FOFBPhaseSyncEn-Sel"){ diff --git a/utcaApp/Db/pos_calc_adc.template b/utcaApp/Db/pos_calc_adc.template index 173fab6..4675175 100644 --- a/utcaApp/Db/pos_calc_adc.template +++ b/utcaApp/Db/pos_calc_adc.template @@ -64,4 +64,9 @@ record(longin,"$(P)$(R)Ampl$(ADC)-Mon"){ field(INP,"@asyn($(PORT),$(ADDR))AMPFIFO_MONIT_AMP") field(EGU, "au") field(MDEL, -1) + info(Q:group, { + "$(P)$(R)Monit-Mon": { + "value.$(ADC)": {+type: "plain", +channel: "VAL"} + } + }) } From d6289b70308bc5f1f2ab65ccdf4ff3c0231bb4a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Fri, 22 Nov 2024 10:33:04 -0300 Subject: [PATCH 3/3] acq: add BPM data NTTable. This allows clients to fetch acquisition data atomically with a single connection. It also provides a practical visualization for clients using pvget/pvmonitor. --- utcaApp/Db/bpm_data.template | 5 +++++ utcaApp/Db/bpm_pos_data.template | 21 +++++++++++++++++++++ utcaApp/Db/pos_calc.template | 10 ++++++++++ 3 files changed, 36 insertions(+) diff --git a/utcaApp/Db/bpm_data.template b/utcaApp/Db/bpm_data.template index 633d39e..9316b8e 100644 --- a/utcaApp/Db/bpm_data.template +++ b/utcaApp/Db/bpm_data.template @@ -4,4 +4,9 @@ record(aai, "$(P)$(R)$(ACQ_NAME)Ampl$(ADC)Data"){ field(FTVL, "LONG") field(SCAN, "I/O Intr") field(INP, "@asyn($(PORT),$(ADDR))ADC") + info(Q:group, { + "$(P)$(R)$(ACQ_NAME)Data-Mon": { + "value.$(ADC)": {+type: "plain", +channel: "VAL"} + } + }) } diff --git a/utcaApp/Db/bpm_pos_data.template b/utcaApp/Db/bpm_pos_data.template index fc1a882..0ccb734 100644 --- a/utcaApp/Db/bpm_pos_data.template +++ b/utcaApp/Db/bpm_pos_data.template @@ -2,24 +2,45 @@ record(aai,"$(P)$(R)$(ACQ_NAME)PosXData") { field(EGU, "nm") field(NELM, "$(NELM)") field(FTVL, "DOUBLE") + info(Q:group, { + "$(P)$(R)$(ACQ_NAME)Data-Mon": { + "value.X": {+type: "plain", +channel: "VAL"} + } + }) } record(aai,"$(P)$(R)$(ACQ_NAME)PosYData") { field(EGU, "nm") field(NELM, "$(NELM)") field(FTVL, "DOUBLE") + info(Q:group, { + "$(P)$(R)$(ACQ_NAME)Data-Mon": { + "value.Y": {+type: "plain", +channel: "VAL"} + } + }) } record(aai,"$(P)$(R)$(ACQ_NAME)SumData") { field(EGU, "au") field(NELM, "$(NELM)") field(FTVL, "DOUBLE") + info(Q:group, { + "$(P)$(R)$(ACQ_NAME)Data-Mon": { + "value.S": {+type: "plain", +channel: "VAL"} + } + }) } record(aai,"$(P)$(R)$(ACQ_NAME)PosQData") { field(EGU, "nm") field(NELM, "$(NELM)") field(FTVL, "DOUBLE") + info(Q:group, { + "$(P)$(R)$(ACQ_NAME)Data-Mon": { + "value.Q": {+type: "plain", +channel: "VAL", +trigger: "*"}, + "": {+type: "meta", +channel: "VAL"} + } + }) } record(aao,"$(P)$(R)$(ACQ_NAME)_PolyXArrayCoeff-SP") { diff --git a/utcaApp/Db/pos_calc.template b/utcaApp/Db/pos_calc.template index 49b429c..b7aba4d 100644 --- a/utcaApp/Db/pos_calc.template +++ b/utcaApp/Db/pos_calc.template @@ -131,6 +131,16 @@ record(aai, "$(P)$(R)TableLabels-Cte"){ labels: {+type: "plain", +channel: "VAL"}, descriptor: {+type: "const", +const: "monit-rate data"} }, + "$(P)$(R)GENData-Mon": { + +id: "epics:nt/NTTable:1.0", + labels: {+type: "plain", +channel: "VAL"}, + descriptor: {+type: "const", +const: "general acquisition core data"} + }, + "$(P)$(R)PMData-Mon": { + +id: "epics:nt/NTTable:1.0", + labels: {+type: "plain", +channel: "VAL"}, + descriptor: {+type: "const", +const: "post-mortem acquisition core data"} + }, }) }