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  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: StreamDevice record locking and processing question
From: "Wang, Andrew via Tech-talk" <tech-talk at aps.anl.gov>
To: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Sat, 6 Aug 2022 07:41:37 +0000
Hi all,

This is more of a conceptual question and some insight would be greatly appreciated.

In my EPICS drivers, I employed something an architecture known as "Slow Periodic Scan with Fast Change Response" seen in page 28 (Link: EPICS Re: Recommendations for StreamDevice "architecture" flow (anl.gov)). Thus far, the instruments for which I have written drivers are pretty responsive. However, as I've been using EPICS more and more, I am curious to know more about how StreamDevice handles this particular and possible situation.

Suppose I have a setter and getter for changing the voltage. Using the architecture above, the records can be linked together in the following manner (pseudo-code).

record(fanout, "slow_scan")
{
      field(SCAN, "1 second")
      field(FLNK, "get_voltage")
}

record(ao, "set_voltage")
{
      field(DTYP, "stream")
      field(SCAN, "Passive")
      field(OUT, ...)
      field(FLNK, "get_voltage")
}

record(ai, "get_voltage")
{
      field(DTYP, "stream")
      field(SCAN, "Passive")
      field(INP, ...)
}

When I process "set_voltage", a asynchronous passively-scanned record, it will start the protocol in another thread. What if it takes about 5 seconds after the first OUT command is sent to the instrument to receive a reply back. My understanding is that the protocol will lock the device, so no other records can communicate with the instrument. However, in the example above, "get_voltage" will process every 1 second, but won't be allowed access. Since "get_voltage" is also asynchronous, will it just simply not do anything until "set_voltage" completes and processes it through the forward-link? I guess my question is more about what "get_voltage" would be doing in this situation while "set_voltage" has the protocol locked. 

Thanks,
Andy

Replies:
Re: StreamDevice record locking and processing question Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: Way to know when streamReload has been completed Wang, Andrew via Tech-talk
Next: Re: StreamDevice record locking and processing question 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  <20222023  2024 
Navigate by Thread:
Prev: Re: Question about "indirect processing" mentioned in documentation for the SSEQ Wang, Andrew via Tech-talk
Next: Re: StreamDevice record locking and processing question 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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·