EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: DBRecord <-> PVRecord data exchange
From: Ignacio Arriagada via Tech-talk <tech-talk at aps.anl.gov>
To: Joao Paulo Martins <JoaoPaulo.Martins at ess.eu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 11 Oct 2023 11:46:35 -0400
Hello Joao,
Thank you so much for your reply!
I think I understand. What I need is closer to [4], but this leads me to the following questions.
  • Is using the pvaClient lib the only way to interact with a PVRecord? If I want to trigger processing on a PVRecord from a thread running on my IOC, would something like a putGet() on the PVStructure of said record be THE way to trigger it?
  • For PVRecords, is there something like SCAN=EVENT? For DBRecords, I would call postEvent(eventNameToHandle("rec_trgr")) to process a particular record or set of records from within a thread or a callback. Is there something like it for PVRecords?
Thanks again for your help and patience.
Best regards,
Ignacio

On Thu, Oct 5, 2023 at 11:45 AM Joao Paulo Martins via Tech-talk <tech-talk at aps.anl.gov> wrote:

Hello Ignacio,

It depends on exactly what you want to achieve. If you want to create a Normative Types PV from your regular EPICS database, you might want to use the PV groups [1].

You also can do a lot by using PVA links [2] in your database records.
In the example below you would read from PVA to a longin record:

record(longin, "$(P)$(R)DBRInput") {
    field(DESC, "Copy of PVAInput")
    field(INP,  {pva:{pv:"$(P)$(R)PVAInput",proc:true}})
}

You can also do the other way around and write to a Normative Types PV:

record(longout, "$(P)$(R)DBROut") {
    field(DESC, "write using PVA")
    field(OUT,  {pva:{pv:"$(P)$(R)PVAOut"}})
}

PVA links are available in the pva2pva library that is part of EPICS Base already, and soon will be also in PVXS (QSRV2).

But if you need at a more "complex" integration, I would definitively go for PVXS inside you IOC [3]. You can use the aSub record to read from your regular DBR PVs (records) and from there you can use the SharedPV class from PVXS to do whatever you want. Bruno Martins has a very nice example [4]. If your "old" IOC runs EPICS Base 7+ and QSRV is enabled, it is already producing Normative Types PVs that could be accessed by a PVXS client context via read (get) and subscription (monitor) operations inside the same IOC.

[1] - https://epics-base.github.io/pva2pva/qsrv_page.html#qsrv_group_def
[2] - https://epics-base.github.io/pva2pva/qsrv_page.html#qsrv_link
[3] - https://indico.fnal.gov/event/58280/contributions/264559/
[4] - https://github.com/brunoseivam/tabulator/blob/main/stackerApp/src/stackerSup.cpp


Kind regards,

João Paulo Martins
European Spallation Source ERIC


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Ignacio Arriagada via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, October 4, 2023 5:38:50 PM
To: tech-talk at aps.anl.gov
Subject: DBRecord <-> PVRecord data exchange
 
Hello Tech-Talk!
I'm trying to integrate PVAccess (or PVXS) capabilities into an old IOC.
  • What would be the best way to exchange data between the old DBRecords and the new PVRecords with custom data structures, within the same IOC
  • Do I need to set up a pvClient within the same ioc? 
  • Does the exchange need to be done via PVAccess connections or is there an internal way of doing it?
I've been reading Marty Kraimer EPICSV4 developers guide and associated git examples. I'm also consulting Michael Davidsaver's PVXS documentation but it is not clear to me yet how to accomplish this. Are there other resources or examples that I could access regarding this topic?
Thank you all in advance,
Regards,
Ignacio

Replies:
Re: DBRecord <-> PVRecord data exchange Veseli, Sinisa via Tech-talk
References:
DBRecord <-> PVRecord data exchange Ignacio Arriagada via Tech-talk
Re: DBRecord <-> PVRecord data exchange Joao Paulo Martins via Tech-talk

Navigate by Date:
Prev: Re: Job Oppotunity BESSY II Control Systems Engineer ROCK-IT Project Heinz Junkes via Tech-talk
Next: RE: Question regarding ADPluginFile driver Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Re: DBRecord <-> PVRecord data exchange Joao Paulo Martins via Tech-talk
Next: Re: DBRecord <-> PVRecord data exchange Veseli, Sinisa via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
ANJ, 13 Oct 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·