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  <20192020  2021  2022  2023  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  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: StreamDevice device locking
From: Dirk Zimoch via Tech-talk <[email protected]>
To: <[email protected]>
Date: Fri, 8 Feb 2019 14:53:01 +0100
Or maybe the libs don't match between my build system and your system. I will check.

On 08.02.19 14:49, Dirk Zimoch wrote:
I just remembered that with GPIB the whole bus is basically locked while a device is addressed. This is typically the case while the IOC is waiting for a reply. The device is addressed as a "talker" during this time. So no other device can use the bus. Thus it is a limitation of GPIB that you cannot really interlace communication with multiple devices.

I thing one could make it work if the device can send SRQ when it has a reply. So the IOC would only address the device when it has actually something to talk. But that is probably more effort to implement than it's worth.

Dirk

On 08.02.19 14:40, Dirk Zimoch via Tech-talk wrote:
The question is: Is there a way to tell *asyn* to block only on the address level?

This may depend on the implementation of the particular asyn interface. I do not have any devices with addresses at the moment. (Only GPIB comes to my mind.) So I cannot test.

StreamDevice calls pasynManager->blockProcessCallback() with its asynUser handle. The asynUser handle is bound to an address on a port. So I had expected that asyn blocks only that address, not others on the same port.

I have to set up a GPIB system with at least 2 devices first before I can test this case.

Dirk


On 08.02.19 14:24, Joao Afonso via Tech-talk wrote:
Hello,

At the moment I am experimenting with StreamDevice, while connecting it to a custom asynPortDriver (instantiated with ASYN_MULTIDEVICE, ASYN_CANBLOCK).

According to the documentation, each protocol command blocks the device for the duration of the protocol, which makes sense. But an access to two devices on two different addresses should be possible:
http://epics.web.psi.ch/software/streamdevice/doc/processing.html

  * /"The first |out| command in the protocol locks the device for
    exclusive access. That means that no other record can communicate
    with that device. This ensures that replies given by the device
    reach the record which has sent the request. _On a bus with many
    devices on different addresses, this normally locks only one
    device_. The device is unlocked when the protocol terminates.
    Another record trying to lock the same device has to wait and might
    get a |LockTimeout|." /

However, I noticed that if I process two records with stream device, for addresses #1 and #2, it first runs all callbacks for address #1, and only after to #2. This is contrary to my expectation, which would be to see callbacks to both devices being executed interleaved.

Is there a way to tell StreamDevice to block only on the address level, allowing to different addresses to be processes simultaneously?

Thanks,
Joao Afonso
CERN TE-EPC-CCS



Replies:
Re: StreamDevice device locking Dirk Zimoch via Tech-talk
References:
StreamDevice device locking Joao Afonso via Tech-talk
Re: StreamDevice device locking Dirk Zimoch via Tech-talk
Re: StreamDevice device locking Dirk Zimoch via Tech-talk

Navigate by Date:
Prev: Re: StreamDevice device locking Dirk Zimoch via Tech-talk
Next: Re: StreamDevice device locking Dirk Zimoch 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: StreamDevice device locking Dirk Zimoch via Tech-talk
Next: Re: StreamDevice device locking Dirk Zimoch 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  <20192020  2021  2022  2023  2024 
ANJ, 08 Feb 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·